QuestionQ25

VerifiedEssential Commands

Which of the following shell redirections writes standard output and standard error output to a file named filename?

Explanation

>filename 2>&1 redirects standard output to filename and then duplicates that redirected output descriptor for standard error. Redirection order is significant: both file descriptors therefore point to the same file.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!