Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Aug 2002 17:05:58 -0500
From:      Erik Greenwald <erik@smluc.org>
To:        Michael Grant <mg-fbsd3@grant.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: find by inode
Message-ID:  <20020811220558.GA3119@freya>
In-Reply-To: <200208111424.g7BEOxa29497@splat.grant.org>
References:  <200208111424.g7BEOxa29497@splat.grant.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 11, 2002 at 04:24:59PM +0200, Michael Grant wrote:
> Does anyone know how I can list the files within a filesystem by inode 
> number?  i.e. for each inode within a file system, print it's
> filenames(s).  And I do mean filename(s) because each inode can have
> more than one link.
> 
> I can write a perl script to do a find, build a hash, and print this
> info out, but surely, there must be a more efficient way.  
> 
> For every given inode, I want to know what the filename(s) are.
> Unfortunatly, ls doesn't provide this info.
> 

sure it does... with the -i for inode flag

ls -i | sort -n

> Michael Grant
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
        -Erik <erik@smluc.org> [http://math.smsu.edu/~erik]

The opinions expressed by me are not necessarily opinions. In all probability,
they are random rambling, and to be ignored. Failure to ignore may result in
severe boredom or confusion. Shake well before opening. Keep Refrigerated.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020811220558.GA3119>