Sei sulla pagina 1di 13

RashyNaaz,

NICE & OD COMMANDS

nice command
Purpose: Runs a Command at a higher or lower priority.

Syntax:
nice [ - Increment| -n Increment ] Command [ Argument ... ]

where,
-Increment
     

Increments a command's priority up or down. You can specify a positive or negative number. Positive increment values reduce priority. Negative increment values increase priority. Only users with root authority can specify a negative increment. If you specify an increment value that would cause the nice value to exceed the range of -20 to 19, the nice value is set to the value of the limit that was exceeded.

Cont,
-n Increment  This flag is equivalent to the - Increment flag. Command  The Command parameter is the name of any executable file on the system.

Cont,
The nice command does not return an error message if you attempt to increase a command's priority without the appropriate authority. Instead, the command's priority is not changed, and the system starts the command as it normally would. The nice value is used by the system to calculate the current priority of a running process. Use the ps command with the -l flag to view a command's nice value. The nice value appears under the NI heading in the ps command output.

Format
To run a command at low priority, enter: nice cc -c *.c This example runs the cc command at low priority. This does not run the command in the background. The workstation is not available for doing other things. To run a low-priority command in the background, enter: nice cc -c *.c & This example runs the cc command at low priority in the background. The workstation is free to run other commands while the cc command is running.

Examples
To specify a very low priority, enter: nice 15 cc -c *.c & This example runs the cc command in the background at a lower priority than the default priority set by the nice command. To specify a very high priority, enter: nice --10 wall << This example runs the wall command at a higher priority than all user processes, which slows down everything else running on the system

od Command
Purpose: Displays files in a specified format. Syntax:
To Display Files Using a Type-String to Format the Output

od [ -v ] [ -A AddressBase ] [ -N Count ] [ -j Skip ] [ t TypeString ... ] [ File ... ]

Cont,
A AddressBase  Specifies the input offset base. The AddressBase variable is one of the following characters:  d, Offset base is written in decimal.  o, Offset base is written in octal.  x, Offset base is written in hexadecimal.  n, Offset base is not displayed.

Cont,
-j Skip  Jumps over the number of bytes given by the Skip variable before beginning to display output. -N Count  Reads the maximum number of n bytes and quits.

Cont,
-t type Specifies the output format to use when displaying data from a file. One can repeat this option with different format types to see the file in different formats. By default od dumps a file as 2-byte octal numbers. One can specify the number of bytes od uses to compose each number by specifying a length indicator.

Cont,
When the -v flag is specified, all the lines are printed.

THANK YOU.

Have A Nice Day.

Potrebbero piacerti anche