On 04/03/10 15:50, Jeff Mahoney wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 03/04/2010 10:41 AM, Donn Washburn wrote:
Thanks Steffen - a new command also. Looking in the manpages I didn't see a way to see what they were linked to. Besides the link must be a hard type link based on size.
You can also tell if it's a hard link based on the link count in the ls - -l output.
For example, /usr/bin/{nis,yp}domainname are hard linked.
% ls -la /bin/{yp,nis}domainname - -r-xr-xr-x 2 root root 10800 2010-02-12 19:35 /bin/nisdomainname - -r-xr-xr-x 2 root root 10800 2010-02-12 19:35 /bin/ypdomainname
The second column, after the permissions, shows the link count. A file without multiple links has a '1' instead. You can verify that two files are hard linked by adding the -i flag and examining the new first column, which is the inode number.
- -Jeff
- -- Jeff Mahoney SUSE Labs
You can think of links as other references to the regular file you are listing. # stat /usr/include/QtCore/QXmlStreamEntityResolver File: `/usr/include/QtCore/QXmlStreamEntityResolver' Size: 24 Blocks: 8 IO Block: 4096 regular file Device: 802h/2050d Inode: 1080369166 Links: 24 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-03-04 16:27:54.427743397 +0000 Modify: 2010-02-11 15:55:15.000000000 +0000 Change: 2010-03-02 03:17:16.563041748 +0000 Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org