The Date command can be used to display or set the date. If the user has superuser privileges, he or she can set the date by providing a digital string in the following command: $ DATE 0101010004 This command sets the date to 2004 (04) January 1 (0101) In the early hours of the morning 1 Time (0100). However, any user can display the date with the desired format. Note that a plus " " is required before the format sequence. If there is no expected output of this command, try to include it in single quotes: $ DATE '% h% m% s' 204748 You can include space in the sequence, then you need to use double quotes: $ DATE "% H% m% s" 20 47 51 has more than 30 different format sequences listed on the homepage of the date, which can be combined as needed to get your last output format. Date's output can also be used in scripts, such as $ date -d '2 day' thu jan 29 19:02:02 EST 2004 -D option indicates that the time described in the string after. In the above example, we asked to show the date from now on (January 27, 2004). We can also request the date before three days, and its command is: $ DATE -D '-3 day' Sun Jan 25 20:56:59 Est 2004 Date multiple functions to output additional strings to it , Provide a convenient way to generate a unique file name. $ ls -l | cat> $ (DATE LS_% D% B% Y% H% M.out) $ ls ls _ *. Out ls_04feb041633.out here, we transfer the output of a long file list to CAT, it Turn our output to a file called LS_04FEB041609.out. Note We use a variable for the file name, indicated by the US dollar symbol "$". The "LS_" and ".out" are added to the date, the format is the day (% D) in the month, the local month name abbreviation (% B), the last two digits (% y), hour (% H) and minutes (% m) to produce this file name. Sort and UNIQ. You can operate from the line from the pipe or the file specified from the command line. Unless otherwise specified, SORT operates on the first column of multiple columns. By default, digital columns are sorted in alphabetical columns unless the -n option is used. The SORT column can be specified in two different formats. If you use the -k option, the position of the column starts from 1. You can also use the POS1 format, from the first column numbered numbered numbers. The following two commands produce the same output: $ ls -l * .out | sort 5 -7 $ ls -l * .out | sort -k 6,8 -rw-r - r - 1 Bluher Uses 375 DEC 5 2002 fdisk.out -rw-r - r - 1 Bluher Uses 2447 DEC 28 20:15 ls.out -rw-r - r - 1 Bluher Users 590 Jan 4 21:24 greps.out -rw- R - r - 1 Bluher Users 78 Jan 4 21:25 sgrep.out ... In the default, the column separator of the sort command is a space and tab. You can specify additional separators using the -t SEP option, where SEP is the separator you specify.