如何从脚本中查看日志文件?我尝试了 less / logfile 但不工作
谢谢
you must either specify the logfile you want the output directed to such as:
~]# script [OPTIONS] filename
if no filename is specified when you first launch the script command, then it defaults to saving into filename "typescript" -- so check in whatever directory you first launched the command from.
doing a cat typescript or cat filename should bring up the file's contents.
If you started script using script logfile
, then, a less logfile
should work.