《问》What's is the difference between “>” and “>>” in shell command?
《问》
What's is the difference between “>” and “>>” in shell command?">"
New Create and Add the Text 'Hello' to the File 'log.txt'echo "Hello" > log.txt
">>"
- This is the same like ">", if the file 'log.txt' exists not.
- Olny Append the Text 'Hello' to the End of File 'log.txt', if the file 'log.txt' exists.
ps -aux >> log.txt
Comments