Linux Command script
Script command is used to save the operation process in the log
Script command format:
Script [-a] [-q] [filename] # [-a] append, Not Overwrite previous records # [-q] Quiet Mode, do not show the script start information # [filename] The log name of the stored result. If no file name is entered, more parameters are saved to the ** typescript ** file in the current directory by default. See man manual for details.
Instance description
$ Script Script started, file is typescript ### enter the script command without specifying the file name, $ ls/bin/| head-6bashbunzip2busyboxbzcatbzcmpbzdiff $ whoami gino $ exit exitScript done, file is typescript ### exit the script. You can also press Ctrl + D $ cat typescript # view the log information in the terminal. Script started on Friday 19, May 01, 2015 11:21:53 $ ls/bin/| head-6bashbunzip2busyboxbzcatbzcmpbzdiff $ whoami gino $ exitexitScript done on Friday, January 1, May 01, 2015 11:22:30