Script makes a typescript of everything printed on your terminal.
NAME
script - make typescript of terminal session
SYNOPSIS
script [-a] [-c COMMAND] [-f] [-q] [-t] [file]
hello$ script -a output.log
Script started, file is output.log
hello$ date
Thu Aug 11 14:14:17 CST 2011
hello$ ls
hello.c Makefile output.log README
hello$ exit
exit
Script done, file is output.log
hello$
hello$
hello$ cat output.log
Script started on Thu 11 Aug 2011 02:14:13 PM CST
hello$ date
Thu Aug 11 14:14:17 CST 2011
hello$ ls
hello.c Makefile output.log README
hello$ exit
exit
Script done on Thu 11 Aug 2011 02:14:20 PM CST
转载于:https://www.cnblogs.com/bambreeze/archive/2011/08/11/2143729.html