Common linux Tips

1. & : In order to run jobs in the background, you need to type an ampersand at the end of the command.

2. nohup : If you are running a process, and you think the process should not end when you exit the account, you can use the nohup command. This command can continue running the corresponding process after you exit the account or close the terminal. By default, all of the job output is redirected to a file named in nohup.out.

& Means run in the background, but when the user exits, the command also pulled out. nohup command can cause permanent execution continues, and the user terminal does not matter. In combination is nohup command &, so that we can make the order permanently in the background.

3. login linux, shell automatically set to the standard keyboard input, standard output and standard error to screen. Transmitting to the standard output file called standard output is redirected > cover, >> is added; redirect standard input is <.

4. In Unix process, each input source and output destination of each identified by a unique identification number, this number is called a file descriptor. When programming, file descriptor to control I / O, each file using a file descriptor.

In Bourne Shell, the formal grammar input and output redirection is used after a digital file descriptor <or>.

By default, Unix provides three predefined file descriptors for each process, most of the time has been good enough. The default file descriptor 0- dimensional input, standard output, 1-, 2- standard error.

0 standard input and standard output 1 can be omitted, standard error 2 can not be omitted.

5. 

 

Guess you like

Origin www.cnblogs.com/i-hard-working/p/11925573.html