From 0f155d91bf486d06d6b83448e56b4e5eedc7a723 Mon Sep 17 00:00:00 2001 From: srdusr Date: Mon, 21 Nov 2022 21:31:12 +0200 Subject: Added useful command to copy text into output file in case not using a graphical term --- linux/linux-commands.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/linux/linux-commands.md b/linux/linux-commands.md index 77b6e02..35b329b 100644 --- a/linux/linux-commands.md +++ b/linux/linux-commands.md @@ -1,15 +1,16 @@ ## Job Control -# List jobs, job_id is the numerical value of the job +* 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 +* suspend job into background, similar to pause so that one can can do something else -# Can resume it's running in the background by: +* Can resume it's running in the background by: $ bg -# Bring it back to foreground by inserting: +* Bring it back to foreground by inserting: $ fg -# Or this incase of multiple jobs: +* Or this incase of multiple jobs: $ fg % -#To suspend the process running in the background, use: +* 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) +$ 2>&1 | tee output-file -- cgit v1.2.3