Skip to content

Instantly share code, notes, and snippets.

@shanemhansen
Created December 20, 2011 23:39
Show Gist options
  • Save shanemhansen/1503826 to your computer and use it in GitHub Desktop.
Save shanemhansen/1503826 to your computer and use it in GitHub Desktop.
Using the /proc filesystem
shansen@bazinga:~/Documents/dev/looplingo$ ls -hal /proc/22499/fd
total 0
dr-x------ 2 shansen shansen 0 2011-12-20 16:27 .
dr-xr-xr-x 8 shansen shansen 0 2011-12-20 16:27 ..
lrwx------ 1 shansen shansen 64 2011-12-20 16:28 0 -> /dev/pts/0
lrwx------ 1 shansen shansen 64 2011-12-20 16:28 1 -> /dev/pts/0
lrwx------ 1 shansen shansen 64 2011-12-20 16:27 2 -> /dev/pts/0
lr-x------ 1 shansen shansen 64 2011-12-20 16:28 3 -> /home/shansen/VirtualBox VMs/looplingodev/looplingodev.vdi
l-wx------ 1 shansen shansen 64 2011-12-20 16:28 4 -> /home/shansen/VirtualBox VMs/looplingodev/looplingodev.vdi.bz2
shansen@bazinga:~/Documents/dev/looplingo$ cat /proc/22499/fdinfo/3
pos: 1552498688
flags: 0100000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment