Mailinglist Archive: opensuse-factory (242 mails)
| < Previous | Next > |
Re: [opensuse-factory] lsattr and ls -l or l
- From: Jeff Mahoney <jeffm@xxxxxxx>
- Date: Thu, 04 Mar 2010 10:50:03 -0500
- Message-id: <4B8FD6AB.3010108@xxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/04/2010 10:41 AM, Donn Washburn wrote:
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iEYEARECAAYFAkuP1qsACgkQLPWxlyuTD7LOxwCdHF75OXg794fDM8C827dYsfVY
QpgAn0DX51aCotMdndyCTA3re2ZKGOaU
=r6vQ
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/
iEYEARECAAYFAkuP1qsACgkQLPWxlyuTD7LOxwCdHF75OXg794fDM8C827dYsfVY
QpgAn0DX51aCotMdndyCTA3re2ZKGOaU
=r6vQ
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx
| < Previous | Next > |