Article Directory
Shutdown command
sync Synchronize data from memory to hard disk.
shutdown
Shutdown 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 now
Shutdown immediately The
shutdown –h 20:25
system will shut down at 20:25 today. The system will restart immediately
shutdown –h +10
after ten minutes. The
shutdown –r now
system will restart immediately after ten minutes. The system will restart
shutdown –r +10
after ten minutes. It
reboot
is equivalent to shutdown -r now.
halt
Shutting down the system is equivalent to shutdown -h now and poweroff.
View command
cat
Display the contents of the file starting from the first line. Starting
tac
from the last line, it can be seen that tac is written backwards of cat!
nl
When displaying, output the line number along the way!
more
The content of the file displayed page by page is
less
similar to more, but better than more, it can turn the page forward!
head
Just look at the first few lines
tail
just look at the tail few lines
Check space usage
df -h
View disk occupancy. Display
df -h /etc
the available disk capacity under /etc in an easy-to-read capacity format.
du -ah|sort -nr
View the current directory file size and sort from largest to smallest.
ls -lh
View the file size in the
du -h --max-depth=1
current directory and display it in KB, MB. View the current directory file size