Most Popular Posts

15/05/2014

unix list files opened by process application

How to list files being used by the application


When you need to know which files are being used by the application  un unix/linux, you could try using the lsof command:

$ lsof -p <pid number>

But sometimes there is no lsof installed. In that case you can you the awk command:


$ pid=1337$ awk '!/\[/&&$6{_[$6]++}END{for(i in _)print i}' /proc/$pid/maps



No comments:

Post a Comment