CS155 Redirection
<
>
, >>
, or |
% ls -l -rw-rw-r-- 1 applin fac 1234 Jan 17 14:26 alpha -rwxr--r-- 1 applin fac 4918 Jan 15 12:23 beta % rmdir alpha > output rmdir: ‘alpha’: Not a directory %
Why didn’t the error message go to the file output
?
Redirect just stdout with >
or just stderr with 2>
or both stdout and stderr with >&
.
% ls -l gamma delta -rwxr--r-- 1 applin fac 4918 Jan 15 12:23 gamma ls: delta: No such file or directory % ls -l gamma delta >output ls: delta: No such file or directory % ls -l gamma delta >&output %
Modified: 2017-02-03T11:52 User: Guest Check: HTML CSSEdit History Source |
Apply to CSU |
Contact CSU |
Disclaimer |
Equal Opportunity Colorado State University, Fort Collins, CO 80523 USA © 2015 Colorado State University |