From owner-freebsd-questions@FreeBSD.ORG Tue May 22 20:48:42 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A16731065670 for ; Tue, 22 May 2012 20:48:42 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 644998FC08 for ; Tue, 22 May 2012 20:48:42 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa03 [127.0.0.1]) by ltcfislmsgpa03.fnfis.com (8.14.4/8.14.4) with SMTP id q4MKS98R005869; Tue, 22 May 2012 15:48:26 -0500 Received: from smtp.fisglobal.com ([10.132.206.15]) by ltcfislmsgpa03.fnfis.com with ESMTP id 150hut81v4-65 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 22 May 2012 15:48:26 -0500 Received: from dtwin (10.14.152.60) by smtp.fisglobal.com (10.132.206.15) with Microsoft SMTP Server (TLS) id 14.2.283.3; Tue, 22 May 2012 15:48:01 -0500 From: Sender: Devin Teske To: , References: <201205181149.q4IBndvU028665@hera.homer.att.com> <4FB64022.6010206@bananmonarki.se> <4FBB4B8C.3000806@bananmonarki.se> <4FBBCF11.3040007@dreamchaser.org> <4FBBF1B1.4050706@dreamchaser.org> In-Reply-To: <4FBBF1B1.4050706@dreamchaser.org> Date: Tue, 22 May 2012 13:48:06 -0700 Message-ID: <0ae301cd385c$31813370$94839a50$@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGZeMa+PEfFrJ70heYut2TA8KrlFgFpVNetAVWzTToBXJuycAFMxwLnAasgA9+XBSlX4A== Content-Language: en-us X-Originating-IP: [10.14.152.60] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7580, 1.0.260, 0.0.0000 definitions=2012-05-22_05:2012-05-21, 2012-05-22, 1970-01-01 signatures=0 Cc: Subject: RE: hard link identification X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2012 20:48:42 -0000 > -----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.