GNOME User's Guide | ||
---|---|---|
<<< Previous | Appendix A. If you are new to Linux/UNIX | Next >>> |
In addition to regular files, UNIX also has special files called symbolic links (or symlinks for short). These files do not contain any data; instead, they are just "pointers," or "shortcuts" to other files. For example, sasha can have a symlink named ft.txt pointing to the file papers/fieldtheory.txt; this way, when a program tries to access the file ft.txt, the file papers/fieldtheory.txt will be opened instead. As you can see from this example, the symlink and the target file can have different names and be located in different directories.
Note that deleting, moving, or renaming the symlink file has no effect on the target file: if sasha tries to delete the file ft.txt, it is the symlink that will be deleted, and the file papers/fieldtheory.txt will remain unchanged. Also, the permissions of the symlink are meaningless: it is the permissions of the target file that determine whether a user has the access to it.
Symlinks can also point to directories. For example, on the GNOME FTP server (ftp.gnome.org), there is a file /pub/GNOME/latest, which at the time of this writing is a symlink to directory /pub/GNOME/gnome-1.0.53. By the time you read this, the latest version of GNOME is likely to change, and the GNOME maintainers will change the symlink correspondingly, so that it will point to /pub/GNOME/gnome-1.2 or something similar.
<<< Previous | Home | Next >>> |
Permissions | Up | Mounting and unmounting drives |