If you can see this check that
| prev section | up | prev page | next page |
Again, let us assume that the current working directory is /home/john and we wish to create a link 'softfile2' within the subdirectory projects to the file 'softfile'. Notice the '-s' switch:
% date > softfile ( create the file )
% ls -l
-rwx-xr-x 1 john users 605 Nov 18 12:25 softfile
% ln -s /home/john/softfile project/softfile2
% ls -l projects/softfile2
lrwx-xr-x 1 john users 605 Nov 18 12:25 softfile2 ->
/home/staff/john/softfile
Notice the appended pathname on the long listing, the link number has not changed, but the permissions show an 'l' at the beginning of the long listing rather than a '-'. Again any updates in 'softfile' will be reflected in 'softfile2'. A common symbolic link for programmers is to have a link named 'core' that points to /dev/null. Core files are generated when a program 'core dumps' or produces debugging output. These core files take up a tremendous amount of storage, and are use rarely by anyone. The special file /dev/null is the Unix equivalent of a trashcan. In effect, what you are doing is telling the system to scrap the file whenever an attempt is made to create it.
% ln -s /dev/null core % ls -l core lrwx-xr-x 1 john users 9 Nov 18 12:26 core -> /dev/null
With symbolic links you can remove the 'real' file and the symbolic list will still exist.
| Linux tutorials: | intro1 intro2 wildcard permission pipe vi essential admin net fwall DNS diag Apache1 Apache2 MySQL1 MySQL2 |
| Caine 2.0: | Autopsy Cli PartRec Files FileRec Browser FFoxForensics Carving |
| Caine 2.5.1: | Essentials | Basic |
| Useful: | Quiz | Forums | Privacy Policy | Terms and Conditions |
| Site Links: | XMLZoo ActiveSQL ProgZoo SQLZoo |
Copyright @ 2004-2012 Gordon Russell. All rights reserved.