I've wrote a script that periodically change the background of your Linux desktop.
The script and installation description are on github=> bg_cycle
Have fun!
Showing posts with label Linux programming. Show all posts
Showing posts with label Linux programming. Show all posts
29 April 2014
19 February 2013
Get list of file descriptors used by a process in linux
In Linux, you can get a list of all file descriptors used by a running program (process).
It is found under path /proc/{pid}/fd
example, I've started tomcat and go to: /proc/3613/fd.
output of the above directory (on my local machine):
lr-x------ 1 mhewedy mhewedy 64 Feb 19 01:15 0 -> /dev/null
l-wx------ 1 mhewedy mhewedy 64 Feb 19 01:15 1 -> /windows/Work/linuxInstallations/apache-tomcat-7.0.29/logs/catalina.out
l-wx------ 1 mhewedy mhewedy 64 Feb 19 01:15 10 -> /windows/Work/linuxInstallations/apache-tomcat-7.0.29/logs/host-manager.2013-02-19.log
lr-x------ 1 mhewedy mhewedy 64 Feb 19 01:15 11 -> /windows/Work/linuxInstallations/apache-tomcat-7.0.29/lib/annotations-api.jar
lr-x------ 1 mhewedy mhewedy 64 Feb 19 01:15 12 -> /windows/Work/linuxInstallations/apache-tomcat-7.0.29/lib/catalina-ant.jar
.....................................
Notice that the stdin reads from /dev/null, the stdout write to catalina.out file.
Subscribe to:
Posts (Atom)