First, the Directory Processing command
1.mkdir
The path to the command:/bin/mkdir
Function Description: Create a new directory
-P Recursive creation
Example: MKDIR/TMP/FILE01
The catalogue must be planned, and the command should have meaning.
To make it easier to find
2.cd
The path to the command:/bin/
Function Description: Switch directory
. Represents the current directory
.. Represents the top-level directory of the current directory
Cd.. Go back to the top level directory (command format strict specification)
CD plus directory name to switch to the specified location
3.pwd
The path to the command:/BIN/PWD
Function Description: Displays the current directory
4.rmdir
The path to the command:/bin/rmdir
Function Description: Delete empty directory
rmdir [directory Name]
Remove
is not commonly used in practical applications, as knowing
5.cp
The path to the command:/BIN/CP
Function Description: Copy files or directories
Syntax: cp-rp[original file or directory [target directory]
-R Copy Directory
-P Reserved File attributes
6.mv
The path to the command:/BIN/MV
Function Description: Cut file, rename
Syntax: mv[original file or directory [target directory]
Can be renamed under the current directory
Change CRT Theme Options-session options-emulation, appearance
For file directory additions and deletions to search
7.rm
The path to the command:/BIN/RM
Function Description: Delete file
Syntax: rm-rf[file or directory]
-R Delete Directory
-F Force Execution
In the course of learning, it is advisable to build your own files or files that you have copied in your system or create your own.
In the practice directory.
We recommend that you first delete any files before you better do the appropriate backup of the daily data to be backed up
Once the error is removed, try not to read and write to your hard drive, including finding and so on.
The more read and write operations you do, the less likely you will be to recover data in the future
RM Plus file name
=============================================
Summary:
1.mkdir You can create a new directory and use the-P option to create a recursive
2.CD can be used to switch directories
3.pwd can be used to view the current working directory
4.rmdir to delete an "empty" directory
5.CP is used to copy files, use the-r option to copy the directory, copy the file attributes and the-P option
6.MV to cut files and rename files
7.rm used to delete files deleted directory plus-R, delete the same time do not want to ask confirmation plus F
Email: [Email protected]
Job naming submission Format: [Name]+[Big Data Three]
==================================
Ii. File processing commands
1.touch
The path to the command:/bin/touch
Function Description: Create an empty file
Syntax: touch [filename]
* ? Root directory:/
The special naming of the Linux system is legal.
In the Linux system Hollow lattice is used as a delimiter between the command and option options and parameters
It is not recommended to name in this way
2.cat
The path to the command:/bin/cat
Function Description: Display file contents
-N Display line number (nunber)
Syntax: cat [filename]
3.tac
The path to the command:/USR/BIN/TAC
Function Description: Display file contents (reverse list)
Syntax: tac[file name]
4.more
The path to the command:/bin/more
Function Description: Page shows the contents of the file
Syntax: more[file name]
Space or F page
Carriage return line break
Q or Q exits the browsing state
5.less
The path to the command:/bin/less
Function Description: page displays the contents of the file (can page up)
Syntax: less[file name]
6.head
The path to the command:/usr/bin/head
Function Description: Displays the first few lines of the file
-n Specifies the number of rows
Syntax: head[file name]
7.tail
The path to the command:/usr/bin/tail
Function Description: Displays the following lines of the file
-n Specifies the number of rows
-F Dynamic display of file end content
Syntax: tail[file name]
===================================
Summary:
1.touch Creating files
2. View file cat Browse a shorter file, line number plus cat-n
3. Reverse display content TAC does not support the-n option
4. Paging displays the contents of the file more space or F page return line Q or Q exit the browsing state
5.less PAGE Up
6.head shows the first few lines
7.tail shows the end of a few lines
=========================================
Rights Management Command: chmod
The path to the command:/bin/chmod
Function Description: Change file or directory permissions
Syntax: chmod[{ugoa}{+-=}{rwx}][file or directory]
[mode=421] [File or directory]
-R Recursive modification
A file modifier: 1. Super Administrator Root 2. The owner of this file
The first type: authorization with +-=, chmod[{ugoa}{+-=}{rwx}][file or directory]
A means everyone.
+: Increase Permissions
-: Reduce permissions
=: that is, whatever it was before, it's all now unified.
Rwx
U+x
G+w,o-r ibeifeng.list
G=rwx
R----4
W----2
X----1
X----2 of the 0-time Square
W----2 One-time square
X----2 of the 2-time Square
Owner Rwx 4+2+1 =7
Owning group Rw-4+2 =6
Other People r--4
rwxrw-r--: 764
532 4+1 r-x 1+2-wx-w-r-x-wx-w-
RW 6
r--4
---0
640
Linux basic commands