Obtenha PIDs de processos vim:
[srv]~|> ps -C vim -o pid=
4733
4828
Obter arquivos abertos pelo PID:
[srv]~|> ls -l /proc/4733/fd
total 0
lrwx------ 1 user grp 64 2011-05-31 14:48 0 -> /dev/pts/1
lrwx------ 1 user grp 64 2011-05-31 14:48 1 -> /dev/pts/1
lrwx------ 1 user grp 64 2011-05-31 14:47 2 -> /dev/pts/1
lrwx------ 1 user grp 64 2011-05-31 14:48 3 -> socket:[54963]
lrwx------ 1 user grp 64 2011-05-31 14:48 5 -> /home/user/.wmark.ps.swp
Arquivo aberto aqui: ~ / wmark.ps