Commandsdatehwclockfilecaltypewhichwhatismancattailheadwc1.date: display the current system time usage method date + %. The following describes how to use 1date directly, however, you can display a specific time format as needed. 2 date + % Y: display the current year format, for example, 20113 date + % y.
CommandsDateHWcLockFileCal typeWhichWhatis manCatTail head wc
1. date: displays the current system time
The following section describes how to use the "+ % parameter" parameter of date.
1 date can be directly used for display, but a specific time format can be displayed as needed
2 date "+ % Y" displays the current year format, for example, 2011
3 date "+ % y" display current year Format 11 No 20
4 date "+ % m" display current month format 07
5 date "+ % M" shows the current minute
6 date "+ % d" displays the current day (today, January 1, July 20) 20
7 date "+ % D" display month-date-year
8 date "+ % S" display seconds
9 date "+ % s" displays the standard time, starting from January 1, 1970 to now
10 date "+ % F" display year month day
11 date "+ % T" display time 21:34:33
2.HwclockModify system time and hardware time
1 hwclock-w: Modify the hardware time based on the system time
2 hwclock-s: Change the system time based on the hardware time
3. whichCommandLocation in the system
4. view the command type to determine whether it is an internal or external command.
5. commands for viewing cal calendars
Use cal directly to view the calendar of the current month
Cal year view calendar of a specific year
Cal month year view the calendar of a month of a year
6. view the directory or file type in file
File Name and Directory
7. view the command description in whatis.
WhatisLsView the ls command explanation to help you better understand how to use the command.
If an error message is output during whatis execution, you can use makewhatis to generate the whatis database.
8. man gets more help information
Man command to view more details
Man 1 command only
View the corresponding first chapter, which can be displayed using whatis ls.
There are a total of 8 chapters, which are most commonly used: 1, 5, and 8.
Chapter 1: Common user commands
Chapter 5 syntax format description of the configuration file
Chapter 8 Introduction to management commands
9. cat view the File Content
Cat/etc/PasswdView corresponding content
The-n option can be used to add a row number to the front of each row for easy viewing.
10. tail and head are the backend and header of the file content.
-N num: the number of rows that can be viewed at a time.
11. wc is not a restroom. It is used to count the number of lines, characters, bytes,
Wc [options]/etc/passwd
-L only displays the number of rows
-W: only display the number of words
-C: How many bytes are displayed