4

It is possible to find all the paths to a file with a given inode, in general, using find's -inum option. But this has awful performance for typical filesystems. What options are there to improve performance?

Are there filesystems with special support for this task? Are there updatedb-like utilities that index inodes?

The more general, the better the answer.

Postscript For more on requirements, see What's a good solution for file-tagging in linux?

Charles Stewart
  • 2,872
  • 1
  • 26
  • 38

2 Answers2

2
debugfs -R "ncheck your_inode_num" /dev/sda
Chupaka
  • 151
  • 3
  • 1
    Do you know how `debugfs` builds up its map of inodes to paths? (From what little I know about ext2fs, the inode table only tells you about the blocks used by and permissions/types of the inodes.) Is it possible to use `debugfs` with a mounted partition? – Charles Stewart Jun 24 '13 at 10:19
2

hey there is a similar question on SO, maybe that will help.

https://stackoverflow.com/questions/1340263/what-is-the-fastest-way-to-find-all-the-file-with-the-same-inode

julien
  • 1,506
  • 4
  • 15
  • 18
  • 1
    While link only answers may answer the question asked, it is better to include the important parts in the answer along side the link. Link-only answers tend to be prone to link decaying. – Cholthi Paul Ttiopic Jul 04 '18 at 14:09