Common Oracle UNIX Command 1

zhaozj2021-02-16  61

Redirected symbol

UNIX Use '>' and '<' to redirect a command output to a file location. For example:

Man Ls> Man-ls.lst

2. Add the data to the end of a file

Man Ls >> Man-ls.lst

3. Redirect the output to NULL device

When you have a batch job or the result that there is no other Oracle task, you can use the / dev / null device to disable the output, / dev / null device usually uses plan tasks that do not need to output (using UNIX crontab applications) In the following example, a large batch job will be submitted, and its output is prohibited.

& Tag Notification Unix runs in the background, and 2> & 1 syntax notification Unix In this example, in this example, all possible outputs of the large_file.exe file are disabled.

./large_job.exe & 2> & 1> / dev / null

4. Pipelines |

The pipeline command is a very powerful command that uses it to use multiple P letters, which is used to connect the output result of a command, and send the result to another command as input. For example:

I want to list a list of owners of all files under a file:

LS -AL | awk '{print $ 2}' | sort -u

Where awk '{print $ 2}' represents the list of owners from the LS -AL output

Sort -u means deleting repetitive entries

5.wc command

Don't misunderstand, can not be the 'wc' ^ _ ^, this command is used to display the number of words or rows in the UNIX file, which is a common command, such as: I want to know the alert.log file. ORA-00600 Errore the number of times:

Root> cat alert.log | grep ora-00600 | WC -L

222

If only the result of using the WC will display 3 items, the lines, words, characters are indicated separately.

How many connection users are statistically connected in UNIX

WHO | WC -L

转载请注明原文地址:https://www.9cbs.com/read-15920.html

New Post(0)