ils
List filesystem inodes
SYNOPSIS
xfs_ils [-eghlnrV] [-i ino] [-j projid] [-m offset] [-c count] [-N namespace] [-P path] file|directory
PARAMETERS
-e
Show extended attributes.
-g
Show generation number.
-h
Output sizes in human-readable format.
-i ino
Specify a particular inode number to display.
-j projid
Specify a particular project ID to display.
-l
Use a long listing format.
-n
Do not print filename (useful with -i).
-N namespace
Specify an extended attribute namespace.
-P path
Display inode information for a path. Useful for indirect lookups.
-r
Recursively list directory inodes.
-v
Verbose output (currently not used by xfs_ils).
-V
Print version number and exit.
-m offset
Start dumping raw inode data at a specific offset.
-c count
Dump a specific count of raw inode data bytes.
file|directory
The target file or directory for which to list inode information.
DESCRIPTION
The command ils is not a standard, universally available Linux command found in typical base installations. Instead, it commonly refers to utilities designed to list inode information for specific advanced filesystems.
The most prominent example is xfs_ils, which is part of the xfsprogs package for the XFS filesystem. Another instance includes the ils command used in IBM Spectrum Scale (formerly GPFS).
Its primary purpose is to display the metadata associated with inodes, which are data structures that store information about files and directories, such as permissions, ownership, timestamps, and pointers to data blocks, but not the file content itself. This information is crucial for filesystem debugging, recovery, auditing, and understanding the low-level structure of how files are stored.
When encountering references to ils, it's essential to understand the context of the filesystem being discussed, as its availability and exact functionality depend on the specific filesystem tools installed on the system.
CAVEATS
The command ils is not a standard Linux utility universally available. It is typically part of filesystem-specific toolkits (e.g., xfsprogs for XFS, or IBM Spectrum Scale tools). Accessing raw inode information often requires root privileges. Its output is highly technical and primarily intended for filesystem administrators or developers.
INODE STRUCTURE
An inode is a fundamental data structure in Unix-like filesystems that describes a filesystem object, such as a file or directory. It stores vital metadata like permissions, owner, group, size, timestamps (access, modification, change), and the locations of the data blocks on disk. Critically, the inode does not contain the file's name or its actual data content; the filename is stored in the directory entry that points to the inode.
FILESYSTEM DEBUGGING
ils (or xfs_ils) is an invaluable tool for filesystem debugging. It allows administrators to examine corrupted inodes, verify inode allocation, and trace file system structures at a very low level. This is crucial for troubleshooting disk errors, data recovery scenarios, or auditing changes to file metadata that might not be visible through standard `ls -l` commands.
HISTORY
Inode listing utilities have been fundamental to advanced filesystems since their early development. xfs_ils, specifically, emerged as part of the xfsprogs suite, which was initially developed by Silicon Graphics (SGI) for its IRIX operating system's XFS filesystem in the 1990s. With XFS being ported to Linux, xfs_ils became an essential diagnostic tool for Linux users managing XFS volumes, maintaining its role as a key utility for inspecting low-level filesystem structures.


