Sunday, 28 August 2011

Symbolic links in linux

> ln -s origem linksimbólicoDestino
To see the current symbolic links, just type
> ls -la
This will show you all the files. The symbolic links will have an arrow showing you where they are pointing like:
44701634 lrwxrwxrwx 1 sheila sheila 21 2010-11-19 20:19 My Pictures -> /home/sheila/Pictures
44701635 lrwxrwxrwx 1 sheila sheila 19 2010-11-19 20:19 My Videos -> /home/sheila/Videos

The permision part changes in comparison with a normal file. It has a "l" at the beggining.

If you want to see just the place that a symbolic link is pointing to, just write
$ readlink My\ Videos
If you want to see the type of the files on your current position, write:
>file -b *

To display only the symbolic links, write:
> find -type l