Sleep command is used to delay for a fixed amount of time during the execution of any script. When the coder needs to pause the execution of any command for the particular purpose then this command is used with the particular time value.
-20 ~ 19 (40 level)
the smaller number is the pgreater priority.
there is a higher priority or lower priority.
This article talks about the nice command in Linux. In Linux, each process has a nice value granted to it. This value influences the scheduling of processes and thereby determining the amount of CPU to spent on each one of them. “The more the nice value, the less the supposed priority”. This ultimately means that the more the process is nice, the more it allows other processes to get CPU.
nice -n 5 sleep 20
// the new priority will be 5
real time priority
real time priority 1-99というのがある。
delayed execution of command
crontab is used for manage the task.
These timings decide which program at which time must be started by the cron
at command waits its input from the standart input.
cron command is used to schedule the task daily at the same
"at" command is used to schedule the task only once i.e to
run only one time.
no hangup command
Nohup (stands for no hangup) is a command that ignores the HUP signal. You might be wondering what the HUP signal is. It is basically a signal that is delivered to a process when its associated shell is terminated. Usually, when we log out, then all the running programs and processes are hangup or stopped. If we want to continue running the process even after logout or disconnection from the current shell, we can use the nohup command. It makes the processes immune to HUP signals in order to make the program run even after log out. With nohup, you will no longer need to login for a long time just to wait for the process to be completed.
Apostrophes in command line
Redirection is a feature in Linux such that when executing a command, you can change the standard input/output devices. The basic workflow of any Linux command is that it takes an input and give an output.
The standard input (stdin) device is the keyboard.
The standard output (stdout) device is the screen.
stdin(0), stdout(1), stderr(2)
stdin, stdout, and stderr are three data streams created when you launch a Linux command. You can use them to tell if your scripts are being piped or redirected. We show you how.
">" creates a new file with output, and ">>" appends output to the end of the file.
"2>": command 2> file1 executes command, directing the standard error stream to file1.
"2>>": file1 executes command, directing the standard error stream to the end of the file1.
The "< input.txt" part of the command line connects the file input.txt to the program which then uses it as input in place of the keyboard. As with input redirection, this is a feature of the command line interface, not a feature specific to Java.
Notice that all the program's output is sent to the monitor, including the (now useless) prompt.
A filter takes the standard input, does something useful with it, and then returns it as a standard output
operator symbol: |
ex. word count
The tee command in UNIX is a command line utility for copying standard input to standard output. It supports writing whatever it is given from standard input to standard output and optional writing to one or more files. The command is named after T splitter used in plumbing.
The tr command in UNIX is a command line utility for translating or deleting characters.
tr (short for translate) is a useful command line utility that translates and/or deletes characters from stdin input, and writes to stdout.
The cut command in UNIX is a command for cutting out the sections from each line of files and writing the result to standard output.