O'Reilly logo

Linux® Desk Reference, Second Edition by Scott Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Commands

> Send standard output to somewhere other than the monitor.

Example: To save the output of a directory listing to the file “myhome.base”, use

ls -l > myhome.base

< Read standard input from somewhere other than the keyboard.

Example: To get a list of expressions to evaluate from the file “myexpr.ksh”, use

test < myexpr.ksh

2> Redirect standard error as specified. The 2 in this command comes from the UNIX tradition that standard input has a file number 0, standard output 1, and standard error 2.

Example: To send standard error messages to the file error, use

cc -o interest interest.c 2> error

>> Append standard output to the specified file without overwriting the existing contents.

Example: To append Mail directory information to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required