Linux notes (4)-File Operations
Learn cd commands:
Absolute path, relative path (./or ../);
File List:
Ls-F (forward slash indicates directory)-a (display stealth)-l (detailed information)-R (display directory file)-I (display index number) Filter list output: ls-l test (this is a keyword, which can be used? Or wildcard characters)
File Processing:
Touch creates an empty file,-t specifies the timestamp;
Cp copies the file,-r Recursively copies the file,-R recursive directory, and-p keeps the copy time consistent with the source file;
Move or rename a music video file, rm delete the file, and-r recursively delete the file.
Create the mkdir directory and delete the empty directory by using rmdir.
Stat: view the file statistics.
File: displays file types, including text files, executable files, and data files.
Cat: view the entire file.-n indicates the serial number, and-B indicates only the character serial number.
More: displays the entire file by page. less is also more powerful than more. You can display the total number of data rows and the number of rows before loading the entire file.
Tail: view the last 10 lines of the file, head: view the first 10 lines of the file-how many lines are displayed before and after the n lines.