File output, view commands
echo is used to display the input content
cat is used to display the contents of the file
head is used to display the first few lines of the file (default 10 lines)
-n specifies the number of lines to display
tail is used to display the last few lines of the file (default 10 lines)
-n specifies the number of lines to display
-f track display file update (generally used to view the log, the command will not exit, but continue to display the newly added content)
more is used to turn pages to display the file content (only page down)
less is used to turn pages to display file content (with page up and down)
shutdown, restart
shutdown -h now shutdown immediately
shutdown -h +10 shutdown after 10 minutes
shutdown -h 23:30 23:30 shutdown
shutdown -r now restart immediately
poweroff immediately shuts down the computer (most commonly used)
reboot reboots the computer immediately (most commonly used)
archive, compress
zip target.zip myfile zip [compressed file name] [before compressed file name] to compress the file
unzip target.zip to unzip the zip file
gzip to compress files
tar to archive files
tar -cvf test
tar -xvf test.tar
tar -cvzf test.tar.gz/etc
find
locate is used to quickly find file folders (this command needs to establish a database in advance, the database is updated once a day by default, and the update command can be used to manually create and update the database
find is used to find files and folders in advanced
find find location find parameter
find .-name
find/-name*.conf
find/-perm
find/-type