Bowen Su
Bowen Su

Reputation: 1289

How to continue writing command lines when terminal is hanging

Right now, if I type in something that makes it so I am wanting for a response, I have to press ctrl + c to stop running and waiting. Is there a way to continue writing commands without pressing ctrl + c so I don't stop the program that is waiting?

Upvotes: 0

Views: 1892

Answers (2)

donjuedo
donjuedo

Reputation: 2505

You can add & to the end of your command line, and that command runs in the background, while you continue at the terminal.

Ex:

find . -name "*.pdf" > myPDFList.txt &

Upvotes: 2

unutbu
unutbu

Reputation: 880429

You could suspend the program by typing Ctrl-Z and then move the just-suspended process to background by entering the command

bg

You could then type more commands at the terminal prompt in the foreground while the other process continues to run in the background.

Upvotes: 2

Related Questions