Original address: http://www.cnblogs.com/zfyouxi/p/5371317.html
Purpose This article will introduce Linux under new files or folders, delete files or folder commands.
Touch to create a new file, mkdir to create a new folder. RM is used to delete files or folders.
This paper will choose ubuntu14.04 distribution as the basis of descriptive narration.
second, Touch command Linux under the way there are a lot of new files, such as: Use VI to create a new file, use the CP command to copy a file, but most often use the touch command to create a new file.
Grammar: Touch [options] FileName
-A: Changing access time
-M: Changing the time of change
-t timestamp: Changing access time and change time to timestamp
Suppose you do not specify whatever option. Then the touch command creates a new file.
Assuming the-t timestamp option is specified, the touch command changes the file's access time and the change time to timestamp.
Assuming the-a option is used, the touch command changes the file's access time to the current time.
Assuming the-m option is used, the touch command changes the file's change time to the current time.
iii. mkdir command syntax: mkdir [Options] DirName
-P: Recursively create a folder
-mmode: Create a new folder and set file interview mode for folder
Create the Zsy/hxn folder recursively using the-p option.
Use the-M option to specify a new folder file access mode is 770, that is, rwxrwx---。
RM Command syntax: RM [Options] Filename/dirname
-F: Force delete file or folder, even if the folder is not empty
-r: Recursive delete files or folders
-I: Need to confirm before deleting files or folders
In the actual use. The-R and-F options are commonly used at the same time to force, recursively delete the specified file or folder.
For critical files or folders, it is recommended that the-I option be used when deleting. Avoid misoperation.
v. Summary
This article describes the new File command touch under Linux, the new Folder command mkdir, and the delete file or Folder command RM.