[英]Linux writing console output to a file
我的控制台上有大量打印件,我想将它们存储到文件中。 谁能在Linux中建议一种方法?
your_print_command > filename.txt
要么
your_print_command >> filename.txt
后者将数据附加到文件中,而不是覆盖它。
为了确保将stderr和stdout都获取到文件而不是控制台
command_generating_text &> /path/to/file
要将stderr和stdout保留在其他文件中
command_generating_text 1> /path/to/file.stdout 2> /path/to/file.stderr
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.