System administration Commands
Stat Displays details of the specified file, more detailed than LS
Who shows online login
WHOAMI Show current Operation user
Hostname Display host name
Uname Display System Information
Top dynamic display currently consumes the most resources process information
PS Display transient process status Ps-aux
Du view directory size Du-h/home with units display directory information
DF View disk size df-h with unit display disk information
Ifconfig Viewing network conditions
Ping Test network connectivity
Netstat Displaying network status information
Man command won't work, find men like: Guy ls
Clear Clear Screen
Alias renamed the Command as: Alias showmeit= "Ps-aux", in addition to de-use Unaliax Showmeit
Kill kills the process, you can first view the process ID with the PS or Top command, and then kill the process with the kill command.
Shut down/Restart the machine
Shutdown
-R shutdown Restart
-H shutdown does not restart
Now turn the machine off.
Halt shut down the machine
Reboot restart
In the game industry, there are frequently used to modify, need to test the activity to open, shutdown is normal, using the date
For example: Get yesterday's time
Date +%y%m%d--date= "-1 day"
Date Usage: date [OPTION] ... [+format] The
Date [-u|--utc|--universal] [MMDDHHMM[[CC]YY][.SS]]
Date can be used to display or set the date and time of the system.
1. In the display, the user can set the format to be displayed, formatted as a plus followed by a number of tokens, where the list of available tokens is as follows:%: print out%
%n: Next line
%t: Jump grid
% H: Hours (00..23)
%I: Small Time (01..12)
%k: Hours (0..23)
% L: Hours (1..12)
% M: minutes (00..59)
%p: Show local AM or PM
%r: Direct display times (12-hour format, HH:MM:SS [AP] M)
%s: The number of seconds since January 1, 1970 00:00:00 UTC
% s: seconds (00..61)
% T: Direct display time (24 hour)
% X: equivalent to%h:%m:%s
%Z: Explicit Time zone%a: Day of the Week (Sun. Sat)
% A: Day of the Week (Sunday). Saturday)
%b: Month (Jan). DEC)
% B: Month (January). December)
%c: Display date and time directly
%d: Day (01..31)
% d: Show date directly (MM/DD/YY)
%h: With%b
%j: Day of the Year (001..366)
%m: Month Copy (01..12)
% U: Week of the Year (00..53) (with Sunday as the first day of the week)
%w: Day of the Week (0..6)
% W: Week of the Year (00..53) (Monday is the first week of Days)
%x: Display date directly (MM/DD/YY)
%y: Last two digits of the year (00.99)
% y: Full year (0000..9999)
2. In terms of setting time
Date-s//Set current time, only root privileges can be set, others can only be viewed.
Date-s 20080523//set to 20080523, this will set the specific time to empty 00:00:00
Date-s 01:01:01//Set time, no changes made to date
Date-s "01:01:01 2008-05-23″//so you can set the whole time
Date-s "01:01:01 20080523″//so you can set the whole time
Date-s "2008-05-23 01:01:01″//so you can set the whole time
Date-s "20080523 01:01:01″//so you can set the whole time
3. Add and Subtract
Date +%y%m%d//display now day and Month day
Date +%y%m%d--date= "+1 Day"//Display days later
Date +%y%m%d--date= "-1 days"//Displays the day before
Date +%y%m%d--date= "-1 month"//show dates on January
Date +%y%m%d--date= "+1 Month"//displays the dates for the next January
Date +%y%m%d--date= "-1 Year"//show dates for previous years
Date +%y%m%d--date= "+1 Year"//show dates for next
or simpler point of date= ' date-d-${t}day ' +%y%m%d '//For T for the first few days
linux-Common Instructions 3