Linux common commands - redirection>

Output redirection command: >

Linux allows redirection of command execution results to a file, and the content that should be displayed on the terminal is saved to the specified file.

example :

ls > test.txt (create test.txt if it does not exist, overwrite its content if it exists).

ls >> test.txt (create test.txt if it does not exist, append the output after it exists).

Save the output of the ls command to test.txt.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325950458&siteId=291194637