Date: Tue, 22 May 2012 13:48:06 -0700 From: <dteske@freebsd.org> To: <freebsd@dreamchaser.org>, <freebsd-questions@freebsd.org> Subject: RE: hard link identification Message-ID: <0ae301cd385c$31813370$94839a50$@freebsd.org> In-Reply-To: <4FBBF1B1.4050706@dreamchaser.org> References: <201205181149.q4IBndvU028665@hera.homer.att.com> <4FB64022.6010206@bananmonarki.se> <CADGWnjVMoamtrxBMGNheVy1CL%2BJjuXetDcq93SiVYn9vAChVnw@mail.gmail.com> <4FBB4B8C.3000806@bananmonarki.se> <4FBBCF11.3040007@dreamchaser.org> <4FBBF1B1.4050706@dreamchaser.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> -----Original Message----- > From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd- > questions@freebsd.org] On Behalf Of Gary Aitken > Sent: Tuesday, May 22, 2012 1:06 PM > To: freebsd-questions@freebsd.org > Subject: hard link identification > > Is there any way to tell if something is a hard link, other than > ls -i > of relevant files and seeing that the inode is the same? > or a better way? > > I was a bit confused when looking at /root/.cshrc and then discovering a > .cshrc in / as well. > ls -l quickly enumerates the link-count of items in the current working directory (displayed as the second column, by-default). For directories, the link-count is quite obviously the number of filesystem entities contained within. For files, the link-count is the number of links to the same file. If this number is higher than 1, then the file you're looking at is a hard-link (which is also indistinguishable from the original). -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0ae301cd385c$31813370$94839a50$>