srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/linux/linux-commands.md
blob: 35b329b78bfaf9bb7945c353ac5442260eeea27e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
## Job Control
* List jobs, job_id is the numerical value of the job
$ jobs
* suspend job into background, similar to pause so that one can can do something else
<Ctrl-Z>
* Can resume it's running in the background by:
$ bg <job_id>
* Bring it back to foreground by inserting:
$ fg
* Or this incase of multiple jobs:
$ fg %<job_id>
* To suspend the process running in the background, use:
$ kill -STOP %job_id

## Copy text/output into a file (useful if in putty/non graphical terminal emulator)
$ <command> 2>&1 | tee output-file