Tuesday, May 14, 2013

What is the linux command to obtain the PID number of a specific program running?

Q. I'm tired to use the "top" and search around for the PID of a program that I know is running on a remote terminal, left open by someone else, and that I want to kill. I wonder if there is a linux command that would return the PID of only that program.

A. ps aux | grep processname
or
pidof processname

How to enter password by linux command?
Q. As the title.I would like to find out How to enter password by linux command?

eg: when you write a script to sudo root. then you will be asked to enter password.
how can i do it by linux script? Is there a command can do the job?
Thanks in advance.

A. Don't. just run sudo script instead of trying to put sudo into the script.

Is there a way to reset the stats for the Linux command df?
Q. For a while now whenever I use the command df in Linux it shows that one of my partitions is full but if I use the du -ac command it shows that I am using only 4.2 of 7.8 Gigs of storage. Is there a way to reset the stats for the Linux command df?

A. Df and du do not measure the same exact things. You can google for: df VS du and see a lot of explanations.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment