I need in a bash script to get details about a file when I know the inode.The system is Linux.
Something like so:
find $SEARCHPATH -maxdepth $N -inum $INUM -exec ls -l {} \;
Since the filename links to the inode, ans not vice-versa, you need to do this in a brute force manner. The -maxdepth is to narrow it down if you have some idea of where it should be. You can also ad -xdev if your searching a tree containing multiple filesystems.