To create a file:
Touch
Modifies the file timestamp. If the file does not exist, a new file is created.
Access time: Read the contents of this file once, this time will be updated.
Modification time: The last time the file content was modified.
Change time: The last time the Inode node of the file was modified.
-C: Do not create a new file.
--no-create: Do not create a new file.
-a:access, modify the file access time.
-m:modify, modify the file modification time.
-T: Modifies the specified time at the specified time (in the format [[CC]YY]MMDDHHMM[.SS]).
Touch–t 201409132040–m Test
File name to be modified.
Install
Copy the file and set its properties.
-D: Create a directory.
Rm:remove
Delete the file.
-i:interactive, Interactive.
-f:force, force Delete.
-r:recursive, recursive delete.
The file name to be deleted.
Cp:copy
Copy files and directories. Copy one file to another file or copy multiple files to another directory.
-R:
-R:
--recursive:
Recursive replication.
-F:
--force:
Forced replication overwrites the source file.
-I: interactive operation.
-A: Archive replication, often used for backups.
-P: Copies files as originally defined (permission information, ownership information, timestamp).
-L: Establish a hard link for the file.
-D: Copy as Symbolic link.
-P:
--no-dereference:
Copy as Soft link.
-L:
--deference
Copy to file.
The name of the file to be copied.
Mv:move
Move or rename the file.
-F:
--force:
Forces the file to move.
The file name to be moved.
Stat:state
View information such as file or file system status.
-C: Displays file information in the specified format.
--format: Displays file information in the specified format.
File information to view.
File
View the file content type.
The name of the file to view.
Cat:concatenate
Connect and display the file. When the file is connected, the results are all output. It is not recommended to use this command if the content is too long.
-N: Displays the line number.
-E: Displays the line terminator $.
-T: Displays tabs.
-V: Displays additional nonprinting characters.
File name to be merged.
Tac
Displays the file information in reverse, starting at the last line.
Shift+pgup/pgdown: Command line display page.
CTRL + C: Abort command execution, start command input from new.
The name of the file to view.
More
Page view file information, support page backward. Shortcut keys are basically the same as man, and do not support K shortcuts. When you turn to the last page, you exit.
The name of the file to view.
Less
is basically the same as man's usage.
The name of the file to view.
Head
Displays the contents of the front row of the file.
-N: The number of rows displayed, which defaults to 10.
The name of the file to view.
Tail
Displays the number of rows following the file.
-N: The number of rows displayed, which defaults to 10.
-F: Monitor file contents. Look at the end of the file, do not exit, wait for the new content appended to this file to be displayed later.
The name of the file to view.
Linux file Management system-file operations