Summary of common Linux commands

Shutdown command

sync Synchronize data from memory to hard disk.
shutdownShutdown command, you can take a look at the help file with man shutdown. For example, you can run the following command to shut down:

shutdown –h 10 ‘This server will shutdown after 10 mins’This command tells everyone that the computer will shut down in 10 minutes and will be displayed on the current screen of the logged in user.
shutdown –h nowShutdown immediately The
shutdown –h 20:25system will shut down at 20:25 today. The system will restart immediately
shutdown –h +10after ten minutes. The
shutdown –r nowsystem will restart immediately after ten minutes. The system will restart
shutdown –r +10after ten minutes. It
rebootis equivalent to shutdown -r now.
haltShutting down the system is equivalent to shutdown -h now and poweroff.

View command

catDisplay the contents of the file starting from the first line. Starting
tacfrom the last line, it can be seen that tac is written backwards of cat!
nlWhen displaying, output the line number along the way!
moreThe content of the file displayed page by page is
lesssimilar to more, but better than more, it can turn the page forward!
headJust look at the first few lines
tailjust look at the tail few lines

Check space usage

df -hView disk occupancy. Display
df -h /etcthe available disk capacity under /etc in an easy-to-read capacity format.
du -ah|sort -nrView the current directory file size and sort from largest to smallest.
ls -lhView the file size in the
du -h --max-depth=1current directory and display it in KB, MB. View the current directory file size

Guess you like

Origin blog.csdn.net/u011047968/article/details/108399538