Tree: View directory Permissions
mkdir: Creating a Directory
-P = parent Directory
-v = verbose detailed procedure
MKDIR-PV/MNT/TEST/{X/M,Y}MKDIR-PV/MNT/TEST/{A,D}_{B,C}
Command line expansion:
The first will create a directory:/mnt/test/x/m and/mnt/test/y
The second will create a directory:/mnt/test/a_b,/mnt/test/a_c,/mnt/test/d_b,/mnt/test/d_c
Touch
The main purpose is to change the timestamp of the file
-m:modify modification Time
-a:access Access Time
-T: Set time
You can create a file: Touch a creates a file
To view files:
Cat
-N: Show line numbers
-E: Displays the end of line character
MORE: Split screen display
Less: Split screen display
Head: Show the first few lines
Tail: Show the following lines
-F: Debugging time will be used, just write the contents of the file immediately display
Cut
-D: Delimiter
-F: The first few fields
Cut-d "-F 3-4/opt/logs/log-2017-05-04.php2017-05-04 17:17:392017-05-04 17:17:392017-05-04 17:18:092017-05-04 17:18:09
Sort
-F: Ignore case
-U: Repeat not displayed
-N: Sort in numeric form
-R: Reverse
-T: Field delimiter
-K: Number of fields
sort -r -t ' ' -k 4 /opt/logs/log-2017-05-04.phpERROR - 2017-05-04 17:18:09 --> severity: warning --> stream_select (): unable to select [4]: interrupted system call (max_fd=5) ERROR - 2017-05-04 17:18:09 --> severity: warning --> stream_select (): unable to select [4]: Interrupted system call (max_fd=5) error - 2017-05-04 17:17:39 --> severity: 8192 --> mysql_ Pconnect (): the mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead ERROR - 2017-05-04 17:17:39 --> severity: 8192 --> mysql_pconnect (): the mysql extension Is deprecated and will be removed in the future: use mysqli or pdo instead
Uniq
-D: Show only duplicate rows
-D: Show duplicate rows (multiple lines)
-C: Number of repetitions
\RM: Restore RM command The most primitive effect
Linux basic commands