What is the purpose of the > operator in Linux?

QuestionsQuestions8 SkillsProData Stream RedirectionNov, 17 2025
091

The > operator in Linux is used for output redirection. Its primary purpose is to redirect the output of a command to a file. When you use the > operator, it creates a new file or overwrites an existing file with the output of the command.

Example:

echo "Hello, World!" > output.txt

In this example, the text "Hello, World!" will be written to output.txt. If output.txt already exists, it will be overwritten.

0 Comments

no data
Be the first to share your comment!