[Klug-general] Another simple question.
Enquiries
enquiries at thedumbterminal.co.uk
Thu Jan 20 20:33:51 GMT 2005
On Thursday 20 January 2005 18:47, Peter wrote:
> What's a symbolic link and how do I create one.
>
> I've looked in my books and I know it's easy - when you've done it once.
>
>
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/kent
basically its like creating a shortcut to a file in windows.
they create a reference to a file or directory from another location. here is
an example:
you compile and install proftpd (ftp server) and it puts its configuration
file in /usr/local/etc/proftpd.conf. you might think its easier to have all
your configuration files in /etc so you can fix this without recompiling
proftpd by using the following command
ln -s /usr/local/etc/proftpd.conf /etc/proftpd.conf
(specify the source first)
(the -s switch is to make the link symbolic)
this will create a reference to the original config file from the /etc
directory.
So if you now view the file from /etc my using
more /etc/proftpd.conf
you are actually viewing /usr/local/etc/proftpd.conf
Note:
if you delete the target of a symbolic link then the link will still exist
in /etc/ but will be broken (appear in a different colour when using "ls").
The same goes if you delete the symbolic link the actual file will not be
effected.
if you copy a file onto a symlink it will overwrite the target file not the
symlink.
--
--------------------------------
http://www.thedumbterminal.co.uk
More information about the Kent
mailing list