From owner-freebsd-questions@FreeBSD.ORG Wed Apr 12 17:13:00 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3901A16A406 for ; Wed, 12 Apr 2006 17:13:00 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8C3443D78 for ; Wed, 12 Apr 2006 17:12:56 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.4) id k3CHCkVX075810; Wed, 12 Apr 2006 12:12:46 -0500 (CDT) (envelope-from dan) Date: Wed, 12 Apr 2006 12:12:46 -0500 From: Dan Nelson To: David Robillard Message-ID: <20060412171246.GA89228@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.5-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd-questions@freebsd.org Subject: Re: Help clarify the '-l' option of ls(1). 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: Wed, 12 Apr 2006 17:13:00 -0000 In the last episode (Apr 12), David Robillard said: > I'd like to have an explication about the '-l' (minus L) option of > the ls(1) command. What exactly is the signification of the second > column in the display? The man page states that it is 'the number of > links'. But what does it mean exactly? It means "the number of links". $ pwd /tmp/z $ touch a $ ln a b $ ls -la total 4 drwxr-xr-x 2 dan wheel 512 Apr 12 12:09 . drwxrwxrwt 8 root wheel 512 Apr 12 12:09 .. -rw-r--r-- 2 dan dan 0 Apr 12 12:09 a -rw-r--r-- 2 dan dan 0 Apr 12 12:09 b "a" and "b" both have a link count of 2. "." has a link count of 2 because it also exists in /tmp as "z". ".." has a link count of 8 because it also exists as "." in /tmp, plus as "tmp" in /, plus as ".." in 5 other subdirectories off /tmp. -- Dan Nelson dnelson@allantgroup.com