Task Processing Commands:
(1) Ctrl + Z hangs up the process and puts it in the background
(2) Jobs shows the currently paused process
(3) BG%N enables the nth task to run in the background (with a space before%)
(4) FG%N to enable nth tasks to run in the foreground
The default BG,FG indicates the last process action without%n!
Log View commands
(1) Use of tail
Tail-f App.log
command format;
tail[necessary parameters [select parameters] [file]2. Command function:
Used to display the content at the end of the specified file, and is processed as input when the file is not specified. Common view log files.
Command parameters:
-F Loop Read
-Q does not display processing information
-V displays detailed processing information
Number of-c< > bytes displayed
-n< lines > Display rows
–pid=pid is shared with-F, which means that the process ends after the id,pid dies.
-q,–quiet,–silent never outputs the header of a file name
The-s,–sleep-interval=s is combined with-F, which indicates the sleep s seconds at each repetition interval
(2) Watch
Watch-d-N 1 Cat App.log
Command format:
watch[parameters [command]
Command function:
The output of the command can be output to a standard output device, which is used for periodic execution of commands/timed execution commands
Command parameters:
-N or –interval watch defaults to run the program every 2 seconds, you can use-N or-interval to specify the time interval.
-D or –differences use the-D or –differences option Watch to highlight the changed area. The-d=cumulative option highlights the changes that have been made (regardless of the recent change).
The-T or-no-title will turn off the watch command at the top of the interval, command, output of the current time.
-h,–help Viewing Help Documents
Usually the first one is enough.
Linux task processing and log viewing common commands