DigiNews

Tech Watch Articles

← Back to articles

What does "2>&1" mean?

Quality: 8/10 Relevance: 9/10

Summary

The article explains the meaning of 2>&1 in shell redirection. It clarifies that file descriptor 1 is stdout and 2 is stderr, and that 2>&1 duplicates stdout so both streams merge to the same destination. It also covers how the order of redirections matters and mentions alternatives for redirecting both streams to a file or through a pipe.

🚀 Service construit par Johan Denoyer