Mittwoch, 22. Februar 2012

Referencing files via VolumeID and InodeID

I found a strange way to adress files in MacOS: Direct referencing via VolumeID and InodeID.

MacOS has a special folder for that: "/.vol"

If you list all files in there it seems empty...
But if you try this for example:

cat /.vol/234881026/4321840

you will get the file referenced by the volume (first part) and the inode (second part).

An example:

>:/$ stat /etc/hosts
234881026 4321840 -rw-r--r-- 1 root wheel 0 236 "Feb 22 12:04:33 2012" "Feb  2 21:25:28 2012" "Feb  2 21:25:28 2012" "Feb  2 21:25:28 2012" 4096 8 0 /etc/hosts


>:/$ cat /.vol/234881026/4321840
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost 



Groovy! =)

Keine Kommentare:

Kommentar veröffentlichen