linux folder role

  • 1. In the letter there is no concept of linux only folders and directories

  • 2.linux files, devices, directories are all file directory is a special file at the top of linux file system is / we say / Linux as the root, is the Linux operating system's file system.

3, associated with the file path of symbolic significance

".":Current directory

"..": on behalf of parent directory "/" directory next level

  • 4, in linux command has many options for command options can be considered a method can be considered in what ways and means to do this command or in what ways and means of presenting the final results of this command. Format commands are command options file (parameters) operation or directory

  • 5, the relative and absolute paths

Absolute path: start from the bottom to access the root directory (/)

Relative path: current position relative terms

  • 6, commonly used commands

1) ls: (list) -l long format of the current names of all folders and files in the directory that this is not to view the contents of a file inside ah! As shown below (this is the view information in a directory under Windows)
2) CAT This is the file path to view the contents of a file inside

3) pwd Print the current working directory

4) cd path changes the current directory

7, create files and folders

touch file name can create a file in the current location can also be an absolute path to create the file, but it is impossible to create a file recursively

mkdir -p directory name and file folders can be created as -p property on behalf of recursive create a folder in the current location and the absolute path that is to set B folder A folder in the following words if A folder has not been created into the A folder will be created and then create a folder B

8, delete files and folders

Rm -r folder name -r means to delete a directory

Folder name rm -f -f represent avoid Confirm Folder Delete the following files and folders

Rm -rf folder name indicates avoid Confirm Folder Delete this folder and delete the following file or folder as well

9, copy the file:

cp source file path pasted file path to the target path can be relative or absolute path

10, Rename (move) files and renaming folders

1) Rename refers to the source and destination locations are not the same as the name of the current location only

Guess you like

Origin www.cnblogs.com/xiangmeng/p/12574424.html