1
vote
3answers
91 views

How do I shutdown the system after a particular process exits

I am downloading some software; I can see the pid of the download process with top. Let's say it's 1001. How can I make it so that my computer shuts down after process 1001 exits?
5
votes
2answers
325 views

Processes do not respond to my signals

I have a strange behavior on my system. When I invoke a command in the shell (bash version 4.2.45(1)-release), say top or cat, the running program (the process) does not respond to Ctrl+C. I even ...
8
votes
3answers
289 views

If you ^Z from a process, it gets “stopped”. How do you switch back in?

I accidentally "stopped" my telnet process. Now I can neither "switch back" into it, nor can I kill it (it won't respond to kill 92929, where 92929 is the processid.) So, my question is, if you have ...
1
vote
1answer
164 views

fg a bg process because you forgot to redirect output to /dev/null

I did Ctrl+Z bg with the intention of disowning next, but I forgot to redirect, now I cant get to my terminal because the scrolling of the output (tarballed a huge directory with verbose set). How do ...
3
votes
1answer
225 views

How does the piping in this command ultimately achieve to kill the process?

I have seen the following line in a bash script for killing a process(in this case started with the command loadgen): ps xww | grep -i "loadgen" | grep "PATTERNMATCH_FACT.xml" | cut -c1-5 | xargs -i ...
14
votes
4answers
16k views

How to stop a background process?

I have started a wget on remote machine in background using &. Suddenly it stops downloading. I want to stop its process, then start it again. How can I stop it? I haven't close its shell window. ...
17
votes
3answers
4k views

Find out current working directory of a running process?

What command(s) can one use to find out the current working directory (CWD) of a running process? These would be commands you could use externally from the process.
5
votes
3answers
2k views

Use & (ampersand) in single line bash loop

I have been using this command successfully, which changes a variable in a config file then executes a Python script within a loop: for((i=114;i<=255;i+=1)); do echo $i > numbers.txt;python ...
0
votes
3answers
729 views

How can I start a process using cpulimit?

I am trying to use cpulimit for testing an app I'm developing under low resource conditions, and I need the process to start under the influence of cpulimit. It is not sufficient to start the program ...
3
votes
4answers
473 views

How to get the id of a very short child process if the parent is known?

I'm looking for a way to get the PID of a short child process in Linux. The process is instant from a human perspective. I know the parent process which will spawn the child process. Is there a way ...
3
votes
3answers
5k views

Fix “firefox is already running” issue in Linux

I am trying to open Firefox in CentOS, but I'm getting the following message: Firefox is already running but is not responding and Firefox doesn't open. I tried this in command line: kill ...
1
vote
3answers
108 views

How to know if a specific program is open

Using a command line in terminal, I want to be displayed 1 if a program (for example Firefox or Chromium) is open and 0 otherwise. Edit: By "open", I mean "is running on the current machine and has a ...
4
votes
1answer
45 views

Suspend and edit previous single line commands

Say I want to modify the latter of some concatenated command line options, is it possible without killing the first command? Specifically I have compile and run scripts executed thusly: > compile ...
2
votes
3answers
1k views

Why does Firefox refuse to die despite killing it with pkill -9?

I am issuing the following command to kill Firefox on my Red Hat Linux box: [subhrcho@slc04lyo ~]$ pkill -9 -f firefox [subhrcho@slc04lyo ~]$ However, when I try to invoke Firefox through ...
3
votes
2answers
316 views

Please explain the -f option in pgrep

man pgrep says the following about -f option: -f The pattern is normally only matched against the process name. When -f is set, the full command line is used. What does it ...
5
votes
4answers
16k views

How do I know what service is running on a particular port in linux?

I am trying to run weblogic server on my linux machine and I am getting the following error : ERROR: transport error 202: bind failed: Address already in use ERROR: JDWP Transport dt_socket failed to ...
1
vote
1answer
188 views

Application in terminal still running but not directly accessible [duplicate]

Possible Duplicate: How to suspend and bring a background process to foreground I have kind of an odd problem which I haven't encountered before. Here's what I did: I started an ...
2
votes
3answers
2k views

How does the set-user-ID mechanism work in Unix?

Can someone please explain the set-user-ID mechanism in Unix ? What was the rationale behind this design decision? How is it different from effective user id mechanism ?
2
votes
2answers
350 views

How to stop a infinite running process (ztail) started by a ssh session after that session is closed

I have a peculiar problem. My server supports multiple ssh session simultaneously, so that multiple admins can manage (via command line interface) it simultaneously. We have a command which calls ...
13
votes
3answers
3k views

How to kill a process with a single command?

I want to kill a process, after finding the id in a single step. I currently use these two commands: pidof <name> kill <#number_which_is_result_of_command> How can I write a single ...
10
votes
4answers
405 views

In bash, what are potential negative consequences of pausing a process with control-z?

Using bash, one can pause a process with control-z. However, are there any general circumstances or guidelines to beware of where a process would not behave well with being paused? My specific ...
1
vote
4answers
6k views

Kill all process of users in Ubuntu?

How to kill all process of one user? When I make ps aux I obtain a list of process with several users, and I want to kill all process of user name1 for example! What's a command to do that in Ubuntu? ...
17
votes
4answers
14k views

How to attach terminal to detached process?

I have detached a process from my terminal, like this: $ process & That terminal is now long closed, but process is still running and I want to send some commands to that process's stdin. Is ...
2
votes
1answer
408 views

There is no bash indicator prompt after a forked process terminates

I am reading the book Advanced Programming in the Unix Environment. There is a test program to test the fork function. It works well in my Ubuntu. But what I confused is that why there is no command ...
4
votes
3answers
838 views

What's the best way to determine the working directory for UNIX process using 'ps'?

I am running a Ruby command line script (rufus.sh)which ultimately calls Thread.new, which spawns a UNIX process as shown below. I run this script for more than 1 directory as the output of the ps ...
2
votes
2answers
855 views

lsof for a specific process?

There's a bzip2 process running in the background and I have no idea where it came from. It's eating up a lot of resources. Can I do a reverse lsof to see which files are being accessed by this ...
2
votes
1answer
2k views

A more readable ps

Are there any tools that improve the readability of ps in the same spirit as ack for grep? This would be especially on OS X where ps does not even have options such as --sort user. So far the nicest ...
3
votes
2answers
610 views

How do I execute a script later?

I need to compile gcc45 on my computer and that's a lengthy and resource-intensive process for my computer, so I'd prefer to have it do it while I sleep (at night). What's the closest thing to: $ ...
19
votes
3answers
815 views

Can other users view the arguments passed to a command?

If I invoke a command with arguments like so: bob@bob-pc:~$ command -arg1 -arg2 ...can other users view the arguments passed to the command?
72
votes
6answers
41k views

How can I close a terminal without killing the command running in it?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this: redshift I can't close the terminal, or it will kill the process. Can I run a command in ...
3
votes
2answers
400 views

I need help with a cronjob to watch for runaway processes and kill them

I have an interesting situation, I have a runaway ruby process - I know exactly how I trigger it. Point is, it got me thinking about runaway processes (CPU usage or memory usage). How would one ...
2
votes
2answers
419 views

Is nohup indefinite?

If I run a program with an infinite loop with nohup, will the program run indefinitely (until the machine is reset or until I manually terminate it)?
11
votes
4answers
14k views

How can I kill a particular thread of a process?

$ ps -e -T | grep myp | grep -v grep 797 797 ? 00:00:00 myp 797 798 ? 00:00:00 myp 797 799 ? 00:00:00 myp 797 800 ? 00:00:00 myp This shows the process ...
12
votes
2answers
2k views

Is there a way to intercept interprocess communication in Unix/Linux?

For intercepting/analyzing network traffic, we have a utility called Wireshark. Do we have a similar utility for intercepting all the interprocess communication between any two processes in ...
15
votes
5answers
34k views

Is there a way to see details of all the threads that a process has in Linux?

For Windows, I think Process Explorer shows you all the threads under a process. Is there a similar command line utility for Linux that can show me details about all the threads a particular process ...
74
votes
6answers
31k views

Keep SSH Sessions running after disconnection

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and ...
6
votes
2answers
771 views

Viewing foreground process using ps

I can see the background process using ps. But Is there a way to view the foreground process? For example, $nohup process1 & then ps -ef | grep "process1" would display the process ...