lkml.org 
[lkml]   [1999]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: ext2 tool
    On Fri, 8 Jan 1999, Theo Van Dinter wrote:

    >| Is there any tool that gives the corresponding filename for every inode for
    >| ext2 file system?
    >
    >you can't do inode->filename lookups, but you can try something like:
    >
    >find / -ls
    >
    >that will produce a list like:
    >
    >777917 4 drwxrwxr-x 3 tvd eng 4096 Jan 7 11:09 src
    >953027 373 -rw-r--r-- 1 tvd eng 380980 Dec 18 1996 src/foo
    >
    >the first number is the inode, the 11+ argument(s) is the path
    >
    >| It should print out the inode number, the file name with entire path and
    >| tell
    >| the kind of inode
    >| it is.
    >
    >type of inode? perhaps you mean type of file? (symlink, hard link, file,
    >directory, etc.) you could gather that information from the find -ls above,
    >or you could try something like:
    >
    >find / -exec some_script_that_does_stat {} \;

    find / -ls | awk '{print $1 " " $11}'

    That gets the inode number and the full pathname of the file.

    --
    Mike A. Harris - Computer Consultant - Linux advocate

    Linux software galore: http://freshmeat.net


    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:49    [W:0.021 / U:63.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site