1. Create a new Folder
mkdir file name
Create a new folder named Test under Home
1 mkdir/home/test
2. New text
Create a new test.sh script at home
1 vi/home/test.sh
3. delete files or folders
Delete the test directory in the home directory
1 rm/home/test
This method of deleting without parameters often prompts you not to delete because permissions are not sufficient.
1 Rm-r/home/test
-R is the directory and its subdirectories in a recursive delete parameter table. The directory will be emptied and deleted. The user is usually prompted when deleting a write-protected file contained in a directory.
1 rm-rf/home/test
-F is to delete all files under the directory without prompting the user. Please note that checking the path, the loss of a different directory is tragic.
1 rm-ir/home/test
-I is the interactive mode. With this option, the RM command prompts the user for confirmation before deleting any files.
4. Move a file or folder
MV [options] source file or directory destination file or directory
Parameters:
-I: Interactive mode operation. If the MV operation will result in an overwrite of an existing target file, the system asks if it is rewritten, asking the user to answer "y" or "n" to avoid overwriting the file incorrectly.
-F: Disables interaction. If the MV operation is to overwrite an existing target file without giving any indication, the I parameter will no longer function when this parameter is specified.
5. copy files or folders
CP [Options] source file (source) purpose? n (destination)
Parameters:
-A: equivalent to the meaning of-pdr;
-D: If the source file is a link file attribute (link file), then copy the link file attribute instead of the file itself;
-F: For the purposes of coercion (force), if there are duplicates or other questions, the user will not be asked and forced to copy;
-I: If the purpose N (destination) already exists, the overwrite will ask whether the real action!
-L: The link file of the hard link (hard link) is established rather than copying the file itself;
-P: Copies the past along with the attributes of the file, rather than using the preset attributes;
-R: Recursive continuous replication, for directory replication behavior;
-S: Copy to a symbolic link file (symbolic link), or "shortcut" file;
-U: If destination is newer than source destination!
Finally note that if the source file has more than two, then the last destination document must be "directory" to do!