Visit Our UNIX and Linux User Community

kill a command I am running / then put it to background

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers kill a command I am running / then put it to background
# 1  
Old 08-06-2010
kill a command I am running / then put it to background

I have a command running in the foreground (and so my term window is locked up) and I want to kill it, then resume it in the background and go home. It is creating a zip file, and the file will be written to the current directory - no std in / std out issues.

How do I do this? Kill it with a control-Z, then how do I get it going again in the background?

Danny Hindes, hindesite
# 2  
Old 08-06-2010
Once you've ctrl-z'ed it, run bg to put it into background execution.
# 3  
Old 08-07-2010
ctrl - c will actually give you the terminal back killing all the processes running under its ownership. then run the process in nohup mode -

ex -

>>nohup &

above command will give you back the terminal and run the script/ command in background. Once you logout the session, shell will transfer the ownership of the process to bin.
This User Gave Thanks to kd09714 For This Post:
# 4  
Old 08-10-2010
Thanks - this works.

- hindesite

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Htop - How to detect exact command running at background

Hello, I am running a python file from terminal and I wish to see which code is running at background. When I use htop, I see just a few commands, unable to see entire command. htop > report nano report Output: ^ Following parts of ffmpeg line is not shown by htop. Just showing... (7 Replies)
Discussion started by: baris35
7 Replies

2. Shell Programming and Scripting

Put currently running script into background

Hi All, Suppose I have a script and inside it I want/need to put it into background. I need the script to not react to SIGHUP signals. I tried: #!/bin/bash echo "" > test_disown mypid=$$ echo "PID=$mypid" ( kill -SIGSTOP $mypid jobs > myjobs #disown -h <job-spec> #kill -SIGCONT $mypid )... (6 Replies)
Discussion started by: JackK
6 Replies

3. UNIX for Beginners Questions & Answers

Idle command to kill the process running n unx box machine

Hi Team , I have one process named as cec_analysiseool that is running on unix box machine now i want to kill this process so please advise what will be the ideal command to kill this , what i have tried is :confused: kill -9 `ps -ef | grep cec_analysiseool | grep -v grep | awk '{print $2}'` (2 Replies)
Discussion started by: unclesamm
2 Replies

4. UNIX for Dummies Questions & Answers

Sudo ssh with command running in background

I am trying to run a command. This is one of my attempts: for i in fileservera; do ssh -t $i 'sudo ls /';doneThis works, and I see the directories. However, what I want to do now is start a process on the remote server such as /usr/bin/connectproc -standalonesudo /usr/bin/connectproc... (1 Reply)
Discussion started by: newbie2010
1 Replies

5. Shell Programming and Scripting

Command to know all the Current running process and how to kill

All, 1.What is the unix comand used for all current running process (Including All current running processes Parent ->child->subchild process) 2.If child and subchild processes are running then what is the unix command to kill parent and its all child subchild processes in UNIX. Kindly... (7 Replies)
Discussion started by: skp
7 Replies

6. Linux

Not able to put ls -lR command in background

Hi All, i am trying to put ls -lRt command to run in the background but it fails. i continue to get output on screen and didnt get the command prompt right after i put the command in background. command i am using is ls -lRt & i am using bash. Can someone let me know how to... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies

7. Solaris

running command in background

hi all i am running following command ufsdump 0ubf 512 /dev/rmt/0cbn /database/backup2/rman_backup/level1 >> /database/backup2/backup_tape/level1_rman_03aug12 2>&1; i want to run it in background how can i do it in this i am generating logs for backup. the problem occurs when i am... (3 Replies)
Discussion started by: nikhil kasar
3 Replies

8. Shell Programming and Scripting

command to see process running at background

Hi , I want to see all the background process that are running in unix box machine...please guide me is there any specific command for that..since I am executing some scripts at background..!!:confused: (1 Reply)
Discussion started by: nks342
1 Replies

9. Solaris

Kill snoops running in background

Hi, I want to run 2 snoop commands in the background and would like to be able to kill them when I want to. What is the best way to do that at the command line? if I do a fg at the terminal, will that bring only the snoop that I got running myself so I stop them with a CTRL_C or will that... (2 Replies)
Discussion started by: Pouchie1
2 Replies

10. Shell Programming and Scripting

kill PID running in background in for loop

Guys, can you help me in killing the process which is running in back ground under for loop I am not able to find the PID using ps -afx|grep <word in command I entered> (1 Reply)
Discussion started by: mohan_xunil
1 Replies

Featured Tech Videos