Wednesday, September 1, 2010

[LINUX_Newbies] Re: using files in command prompt by their inode number

 

On 01Sep2010 05:31, c2431993 <c2431993@yahoo.com> wrote:
| i want to know the way how can i open any file by using their inode number

You can't. The best you can do is use find (or somethig like it) to locate
the name of the file based on the inode number, then open using the name:

find /mount/point -xdev -inum inode-number-here -print \
| { read -r filename; cat "$filename"; }

or some variation of that. If you really don't know where the file is
(other than the mount point of course, since an inode number is
per-filesystem) then this will be pretty slow.
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Take a perfectly parallel uniform plank of constant density. Balance it exactly
at its centre on a frictionnless pivot. Place the hog at a known distance
from this pivot. Now add stones on the other end at exactly the same distance
until the plank is perfectly horizontal as measured by a precision tiltmeter.

Now guess the weight of the stones.
- Bob Newhart on weighing a hog

__._,_.___
Recent Activity:
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.
.

__,_._,___

No comments:

Post a Comment