function::inode_path - Linux
Overview
inode_path
is a utility that translates inode numbers to file paths in a filesystem.
Syntax
inode_path [OPTIONS] INODE_NUMBER [FILESYSTEM]
Options/Flags
- -h, –help – Display the help message and exit.
- -V, –version – Print version information and exit.
- -p, –physical – Use the physical inode number (as opposed to the logical inode number).
- -l, –logical – Use the logical inode number (as opposed to the physical inode number).
Examples
# Display the path to the file with inode number 1024
inode_path 1024
# Display the logical path to the file with inode number 1024
inode_path -l 1024
# Display the physical path to the file with inode number 1024
inode_path -p 1024
# Display the path to the file with inode number 1024 on the filesystem /dev/sda1
inode_path 1024 /dev/sda1
Common Issues
- If you get an error message that says "inode not found", it means that the inode number you specified does not exist.
- If you get an error message that says "not a directory", it means that the inode number you specified does not refer to a directory.
Integration
inode_path
can be used in conjunction with other Linux commands to perform a variety of tasks. For example, you can use inode_path
to find the path to a file that has been deleted without using the rm
command.
Related Commands
find
stat