Showing posts with label redirect. Show all posts
Showing posts with label redirect. Show all posts

Nov 17, 2011

Linux shell IO redirect

IO redirect is fundamental in Linux shell -- one basic thing you should  pay your attention when learning/using Linux.

3 Basic File descriptors:


File Descriptor Name Description
0 stdin standard input
1 stdout standard output
2 stderr standard error

Below I'll introduce 3 advanced usage, well they are also very common scenarios.

1. Redirect stderr to stdout

$ ls non-exist 2>&1