Just like every file also directories have file id. You can see them by typing
How do I view file content by its id?
How do I change directory attribute to file (remove D) and vice versa!
Sounds like the data you are looking for is in the filesystem. The answer to your question depends on which filesystem you are using. I'll assume you are using ext3.
For advanced ability to view and modify data in the filesystem, see the debugfs(8). But careful, you could really corrupt things with this tool. This is a good opportunity to use a Virtual Machine with snapshots (Like I recommended here). Take a snapshot, and then modify the filesystem as much as you want. You can always restore the VM from an earlier snapshot.
inode to filename:
Converting a directory to a file is impossible.
For information about directory internal data, see dirent.h.
You can also consult the GNU C Library as regarding Accessing Directories .
-- solution and how stuff works -- So - inode is the thing to which every directory has record to. In fact - each directory is file, which contains list of file names and corresponding inode numbers for them,
So - if you want to see, what is inside directory inode here is how you do it -
1) open debugfs with your hdd. I found mine under /dev/disks/by-id/..
and you will get data of that inode!
But wait! That is not it!
inode actualy contians no data. It contains pointers to data (block numbers). What inode actualy contains is file mode, attributes, owner, group, size, links and many more! Nice thing? We can use debugfs not only to see that data, but also to modify it!
Here is how you do it!
1) open debugfs in write mode
2) open inode in modify mode and modify/see all fields you like