11-10-2013 02:05 AM - last edited on 11-10-2013 08:27 PM by maikoro
# df -hP /opt/linuxdepots/
Filesystem Size Used Avail Use% Mounted on
uxlinux:/sg/opt/linuxdepots 354G 34G 302G 11% /autofs/linuxdepots
Here both "/autofs/linuxdepots" and "/opt/linuxdepots/" are same. But my query is /autofs/linuxdepots is configured part of autofs. but there is no clue how /opt/linuxdepots/ is configure.
Can any one throw some light on this.
P.S. This thread has been moved from Linux > System Admin to Linux > networking. - Hp Forum Moderator
Solved! Go to Solution.
11-11-2013 06:41 AM
It is probably caused by symbolic links (sort of similar to Windows shortcuts).
Please run this command:
ls -ld /opt /opt/linuxdepots
Either the /opt directory or /opt/linuxdepots may be a symbolic link.
Symbolic links are identified in the ls -ld listing by having a lower-case letter "l" in the first column. They will also have their target displayed at the end of the line. You will probably see something like this:
lrwxrwxrwx 1 root root <timestamp> /opt/linuxdepots -> /autofs/linuxdepots or lrwxrwxrwx 1 root root <timestamp> /opt -> /autofs
The permissions of a symbolic link are normally ignored, and the permissions of the actual file will be used instead.
This is why the permissions of symbolic links are usually always "lrwxrwxrwx" and they cannot be easily changed.
(Some very special situations may produce symbolic links with different permissions, but those situations should be regarded as programming errors or minor filesystem corruption.)
Symbolic links can be created with the "ln -s" command, and deleted with a regular "rm" command.
The use of "ln -s" is conceptually similar to the "cp" command:
"cp <source> <destination>" makes a copy of <source> at <destination>,
and "ln -s <source> <destination>" makes a link to <source> appear at <destination>.
In both cases, if <destination> is a directory, the copy/link will be created using its original file/directory name, but if <destination> is a non-existent file in a valid directory, then the copy/link will be named <destination> instead of its original file/directory name.
11-11-2013 09:48 AM
>"ln -s" is conceptually similar to the "cp" command:
>"ln -s <source> <destination>" makes a link to <source> appear at <destination>.
Hmm, I conceptualize it exactly the reverse. I.e.:
ln -s <target of symlink> <symlink>
Though without the -s, for hardlinks, there is a well defined source.
11-12-2013 02:30 PM
It does not look like symbolic link. Please find the output.
# ll -d /opt/linuxdepots/
dr-xr-xr-x 58 root root 3072 Nov 12 15:12 /opt/linuxdepots/
# ll -d /autofs/linuxdepots/
dr-xr-xr-x 58 root root 3072 Nov 12 15:12 /autofs/linuxdepots/
11-16-2013 02:12 PM
> # ll -d /opt/linuxdepots/
> dr-xr-xr-x 58 root root 3072 Nov 12 15:12 /opt/linuxdepots/
Leave out the last slash from the command. When trying to check the information of a directory symlink, it can make a difference.
Please try this command EXACTLY:
# ll -d /opt/linuxdepots