[From: Linux folder file creation, deletion-the Wind-blog Garden]
1. Delete a folder
RM-RF filenamede>
-Delete a folder instance:
Rm-rf/var/log/httpd/access
the/var/log/httpd/access directory and all files and folders under it will be deleted
To be reminded: Use this RM-RF with extreme caution, Linux does not have a recycle Bin
2. Deleting files
De>rm-f filenamede>
Use RM-RF with extreme caution, Linux does not have a recycle Bin
3. linux Add Files command
Create directory: mkdir (make Directories)
Function Description: Establish directory
Syntax:mkdir [-p][--help][--version][-m < directory property >][directory name]
Supplemental Note: mkdir can create a directory and set permissions for the directory at the same time.
Parameters:
-m< Directory properties > or –mode< Directory properties > set permissions on the directory at the same time as the directory is established.
-p or –parents if the upper-level directory to which you want to create the directory is not currently established, the upper-level directory is created.
Example:mkdir Test
Creating a file Touch
Function Description: Change the file or directory time.
Syntax: Touch [-acfm][-d < datetime >][-r < reference file or directory >][-t < datetime;] [--help] [--version][file or directory ...] or touch [-acfm] [--help] [--version] [Date Time] [File or directory ...]
Supplemental Note: Use the touch command to change the date and time of a file or directory, including access time and change time.
Parameters
-A or –time=atime or –time=access or –time=use only change the access time.
-C or –no-create does not create any files.
-d< Time Date > Use the specified datetime, not the current time.
-F This parameter ignores non-processing and is responsible only for compatibility issues with BSD version touch directives.
-M or –time=mtime or –time=modify only change the change time.
-r< reference file or directory > set the date and time of the specified file or directory to the same date and time as the reference file or directory.
-t< Date Time > Use the specified datetime, not the current time.
Example: Touch test.txt (Note: Linux does not have file suffix name to differentiate file type, System file type only executable files and non-execute files)
"Go" Linux folder file creation and deletion