The operation of files is the most commonly used instruction. It includes switching directories, listing files, establishing files, deleting files, copying files, renaming files, file permissions, file links, etc.
1. Toggle directoryDirective: CD (change diretory changes directory location of account)
Parameter:. Represents the current directory. Represents the upper directory ~Represents the user’s home directory instance:
(1) Switch to the test folder in the upper directory
(2) Switch to the top two directories test Data folder
(3) Switch to your home directory
Operation instructions : If you just want to switch to your home directory, use it directly cd Without any parameters, If you switch to a folder at the top (bottom) level of your home directory, you need to use ~ Represents the home directory.
2. List files / File permissions
instructions : ls （ list directory contents List the files in the data folder)
grammar : ls [ -a ] [ -l ] [ directory_name/filename ]
parameter : -a Display hidden files ； -l Display detailed data. Example : Show in detail that all files under the current data folder contain hidden files. . Beginning archives)
Operational instructions: If no directories and files are added at last, the files showing the existing data folders will be represented.
Supplementary Note: The first field has ten units, indicating the authority of the archives.
d rwx — The first unit is d, which means it is a folder.
– rw- r– R – The first unit is – denotes that it is a general file. Purple denotes the permissions of the file/folder owner; Brown denotes the permissions of the same group; and red denotes the permissions of others. The third and fourth columns are the owner of the file/data folder and the group to which it belongs. In this case, the owner is root and the group belongs to wheel. The fifth field is file size, and the last one is file establishment time and file name.
3. Establishment of archives/Data folder
3.0 Establishment of Data Clip
Instruction: MKDIR (make directories create data folders)
Grammar: MKDIR [-m]directory_name
Parameter: – M parameter followed by mode, directly set the data folder permission when creating the data folder.
Example: (1) Create a data folder named test.
The first and second lines of the journey are the same instructions. You can create data folders.
(2) Create a data folder named test2 with 700 permissions.
3.1 Establishment of Archives Directive: touch (change file access and modification times change file access and modification time)
Example: Create an empty file named ABC.