Re: ext2 tool

Riley Williams (rhw@BigFoot.Com)
Mon, 11 Jan 1999 11:01:05 +0000 (GMT)


Hi Martijn.

>> Is there any tool that gives the corresponding filename for every
>> inode for ext2 file system?

Create /usr/local/bin/ilist with mode 755 and the following contents:

Q> #!/bin/bash
Q> if [ $# -eq 0 ]; then
Q> echo "Usage: `basename $0` dir..."
Q> exit 255
Q> fi
Q> for DIR do
Q> echo "Directory: $DIR"
Q> ls -il `find $DIR`
Q> echo
Q> done
Q> exit 0

When you've done, run it, specifying the mount point of the relevant
file system as a parameter. It doesn't care what type of file system
you point it at, it'll still work...

>> It should print out the inode number, the file name with entire
>> path and tell the kind of inode it is.

All of that and more is included in the output.

Best wishes from Riley.

---
 * ftp://ftp.MemAlpha.cx/pub/rhw/Linux
 * http://www.MemAlpha.cx/~rhw/kernel.versions.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/