Oops. I believe you’re looking to create symbolic links.
SYMBOLIC TYPE
In the symbolic link type, the link is a special disk file of the link type, which has as content the path to reach the target file.
Characteristics:
You can make symbolic links in files and directories;
The symbolic link and the target file need not be on the same disk partition;
If the symbolic link is deleted/moved. Only the link will be deleted/moved;
Any user can create/undo a symbolic link (respecting permissions).
HARDLINK
In the hardlink link type, the link is pointed to the same inode of the target file, so the two files will be the same.
Characteristics:
It is not possible to make a hardlink to a directory;
It is only possible to hardlink files that are on the same disk partition;
If the hardlink is deleted/moved, you will be deleting/moving the target file;
Only the root user can create/undo hardlinks.
LINKING
The ln command is used to create links between two files or to a directory.
Syntax:
ln [OPÇÕES]... [-T] ALVO NOME_LINK (1a forma)
ln [OPÇÕES]... ALVO (2a forma)
ln [OPÇÕES]... ALVO... DIRETÓRIO (3a forma)
ln [OPÇÕES]... -t DIRETÓRIO ALVO... (4a forma)
Explaining:
TARGET: Directory or file from which the link will be made;
NOME_LINK: Name of the link that will be created;
OPTIONS:
-s
Create a symbolic link.
-v
Verbose mode.
Examples:
1 - Creating a symbolic link called "emulator" for the directory /home/Roberto/download/emulator/:
$ ln -s /home/roberto/download/emulador_n64/ emulador
Note that the symbolic link is identified with the "l" at the beginning.
$ ls -lah | grep emulador lrwxrwx--x 1 roberto roberto 36 2006-10-12 22:42 emulador -> /home/roberto/download/emulador_n64/
2 - Creating a hardlink called "text.txt" pointing to the file "target_hardlink.txt":
$ ln alvo_hardlink.txt texto.txt
Note that the file "alvo_hardlink.txt" and the text file.txt have the same Inode and the same Device.
$ stat alvo_hardlink.txt | grep Inode
Device: 304h/772d Inode: 3057948 Links: 2
$ stat texto.txt | grep Inode
Device: 304h/772d Inode: 3057948 Links: 2
Source: http://www.vivaolinux.com.br/dica/Link-simbolico-e-hardlink
If you have understood correctly, symbolic links are the solution (use the command
ln -s
to create them - see manpage for more details).– Vinícius Gobbo A. de Oliveira
Where do I read about what, and what don’t you ask in Stackoverflow? Here 'aculá' I have taken some wood or ask with votes to close it.
– Luitame
I was also curious why the question was suspended.
– pmargreff