first, the purpose
This article describes the new file or folder, delete files, or folder commands under Linux. Touch is able to create new files and mkdir to create new folders. RM is used to delete files or folders. This article will choose the ubuntu14.04 release as a descriptive narrative basis.
second, Touch command
There are many ways to create a new file under Linux, such as using VI to create a new file, copying a file using the CP command, but most often using the touch command to create a new file.
Syntax: touch [options] filename -A: Changing the time to visit-m: changing the time to change-t timestamp: Change the access time and the change time to timestamp
Assume that no matter what option is specified. Then the touch command creates a new file.
Assuming that the-t timestamp option is specified, the touch command changes the file's access time and change time to timestamp.
Assuming that the-a option is used, the touch command changes the file's access time to the current time.
Assuming that the-m option is used, the touch command changes the file's change time to the current time.
iii. mkdir Order
Syntax: mkdir [options] dirname -P: Recursively create a folder-M mode: Create a new folder and set the folder's file access mode
Create the Zsy/hxn folder recursively using the-p option.
Use the-M option to specify the file access mode for the new folder is 770, which is rwxrwx---。
Four, rm command
Syntax: RM [Options] Filename/dirname -F: Forcibly delete files or folders even if the folder is not empty- r: Recursively delete files or folders-I : delete files or folders before you need to To confirm
In the actual use. The-R and-f options are generally used at the same time to forcibly and recursively delete the specified file or folder.
For critical files or folders, it is recommended to use the-I option when deleting. Avoid accidental operation.
v. Summary
This article describes the new File command in Linux under Touch, the new Folder command mkdir, and the delete files or Folders command rm.
mkdir and Touch command differences in Linux