How to collect command's output/results to the log file? What command can write all msg's in shell to the file?
Asked
Active
Viewed 462 times
2 Answers
1
To put some output to file you can use
ls /path_to_folder/ > list.txt
This will put output from ls command to file with name list.txt witch will be created on curent location.
2707974
- 10,363
- 6
- 31
- 44
0
You can use stream redirection to put output into a file.
yourcommand > filename
Will create a new file containing the output of yourcommand.
anewcommand >> filename
Will append the output of anewcommand onto the end of the same file previously used.
Arronical
- 19,653
- 18
- 73
- 128