1752793 Members
6437 Online
108789 Solutions
New Discussion юеВ

how to find filename

 
SOLVED
Go to solution
Satish Y
Trusted Contributor

how to find filename

Hi All,
Is it possible to find out the details of inode like to what file/directory it corresponds to and attributes for e.g. i have only i node number from that i want to find all the details.
Cheers...
Satish.
Difference between good and the best is only a little effort
5 REPLIES 5
Animesh Chakraborty
Honored Contributor

Re: how to find filename

hi Satish,
use -i option with ls
like ls -ali will give you the inode numbers of files.


best of luck
Animesh
Did you take a backup?
Michael Tully
Honored Contributor
Solution

Re: how to find filename

Hi,

Try something like this:

# find /stand -inum -print | xargs ls -lsa

HTH
-Michael
Anyone for a Mutiny ?
Ravi_8
Honored Contributor

Re: how to find filename

Hi,
"ncheck" will help u.
never give up
Satish Y
Trusted Contributor

Re: how to find filename

Thanks all for ur responses....
Michael, Is there any other command like ls to find the same?...
cheers...
Satish.
Difference between good and the best is only a little effort
Robin Wakefield
Honored Contributor

Re: how to find filename

Hi

ls -i will show the inode for a file, so as an example:

find /stand -type f | xargs ls -i | sort +n

will show all files under /stand, sorted by inode.

Rgds, Robin