Difference between ls –L and
ls –l.
We are in directory
>pwd
/proj62/prod/OMC-U/work/leonidk
Run
>ls -al temip_resource.dat
lrwxrwxrwx 1 leonidk users 28 Apr 14 2006 temip_resource.dat -> ../milcmp/temip_resource.dat
As you can see – “ls –al” shows that temip_resource.dat is link to file
../milcmp/temip_resource.dat. We don’t know from command “ls –al “
whether target file exists or not.
Let’s check it:
>ls -aL temip_resource.dat
temip_resource.dat
OK – file exists – now let’s see all it’s (target file) settings:
>ls -aLl temip_resource.dat
-rwxr-xr-x 1 igorz cse 6864 Nov 7 2004
temip_resource.dat
Another example – target file does not exists
>ls -al stub
lrwxrwxrwx 1 nobody nobody 13 Dec 4 18:29 stub -> /tmp/xxx/stub
stub is link to /tmp/xxx/stub
>ls -aL stub
stub: No such file or directory
It means – that our link point to file which does not exist