xfs_ncheck(8)

✨ NAME ✨

okay so bestie, this is xfs_ncheck (the 8 just means it's a System Manager's Manual page, from the System Manager's Manual πŸŽ€). It's how you go from an inode number to a pathname for XFS. "generate pathnames from i-numbers for XFS" πŸ¦‹

πŸ’… SYNOPSIS πŸ’…

xfs_ncheck [ -i ino ] ... [ -f ] [ -s ] [ -l logdev ] device
xfs_ncheck -V

🌸 DESCRIPTION 🌸

ngl this one is kind of iconic. Run xfs_ncheck with no -i arguments and it spits out a list of every inode number and pathname on the filesystem ✨ Anything that's a directory gets a /.. tacked on the end, so you can tell which names are folders πŸ“ The output is not sorted in any particular order, so don't expect neat alphabetical vibes πŸ™ˆ

You point it at the filesystem with the device argument, and that should be the disk or volume device the filesystem lives on πŸ’– Filesystems that are just sitting inside regular files can get checked too, using the -f flag. It's giving flexibility 🧚

πŸ‘‘ OPTIONS πŸ‘‘

  • -f β€” this one tells xfs_ncheck that the filesystem image is stored in a regular file at device, instead of on a real disk. This can happen if you made an image copy of a filesystem into an ordinary file. (See the mkfs.xfs -d file option.) πŸ’œ
  • -l logdev β€” tells it where the filesystem's external log lives πŸͺ΅ This only matters for filesystems that actually use an external log. Check out the mkfs.xfs -l option, and read xfs(5) if you want the full tea on the XFS log πŸ“
  • -s β€” limits the report to special files and files with setuserid mode. Super useful for spotting security policy violations πŸ”₯
  • -i ino β€” limits the report to only the files whose inode numbers follow. You can give it multiple times to pick out several inode numbers at once πŸ¦‹
  • -V β€” prints the version number and exits. Quick and iconic ⭐

🌈 CAVEATS 🌈

πŸ’€ Heads up, bestie: if the filesystem is seriously corrupted, or it's super busy and looks corrupt even when it isn't, you might see a message like the one the xfs_db(8) "check" command generates. Don't panic, just know what you're looking at 😭

Also, xfs_ncheck is only useful with XFS filesystems. It's not gonna do anything nice for other filesystem types 🫢

🧚 SEE ALSO 🧚

mkfs.xfs(8), xfs(5).


That's a wrap on xfs_ncheck(8) from the System Manager's Manual πŸ’– Go forth and slay your inode hunts, periodt πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from