Permission Explanation: R-Readable-4 W writable-2 x execution-1
-rw-r--r--
1 File types
2 3 4 Owner permissions
4 5 6 Group has permissions
7 8 9 Permissions that other people have
CHOMD modifying directory or file permissions-R-union operation
Edit command: divided into patterns and edit modes
VI [filename]
Press ESC to enter command line mode
I insert (enter edit mode)
I enter the beginning of the insertion
A enter end of line edit
o The cursor moves to the next line and inserts a row
o The cursor moves to the previous line and inserts a row
DD deletes the cursor as it moves forward
D Delete the current line at the cursor and insert a new row in the current row
U undo
J Delete Blank Lines
x Delete the character where the cursor is located
r[character] replaces the character that the cursor contains
CW Delete Cursor at the end of the word and enter edit mode
DW Delete cursor at cursor to end of word
CAW Delete the entire word at the cursor location
: 5 top Anchor row
f[characters] Find the first [character] of the current line, continue to find the next
: Set NU Displays line number
: Set Nonu Cancel line number
: Wq Save Exit
: wq! Force Save
: Q exit
: q! Force exit
Y copy current line, YY copy current line start two lines
P Paste Copy Line
Jo cursor moves to the last line and enters edit mode
ZZ Save exit
ZQ Do not save exit
:%[email protected][string]@[string] replaces the first [string] of all rows but case-sensitive
:%[email protected][string]@[string]@g Replace all [strings] for all rows but case-sensitive
:%[email protected][string]@[string] @gi replace all [strings] of all rows is case insensitive
/[string] Find [string] n prev N Next
To view files:
Cat Display file Full contents
More split-screen view-[number] See how many rows
Tail view end of file [number] View post [number] line
Head view first line-[number] view front [number] Line
Bash reads environment settings from four files when a user logs on:
-Global Settings file:
-etc/profile does not require a refresh to take effect once.
-ETC/BASHRC does not require a refresh to take effect once.
-User settings file:
~/.BASHRC every time it needs to be refreshed in addition to the root user settings
~/.bash_profile does not require a refresh to take effect once.
RPM Installation and uninstallation:
Rpm-i Installation
Rpm-u Upgrade
RPM-F Update
RPM-E Removal
Scatter point:
Ifconfig View IP
CP Copy FILE-r copy path-p retain original property
MV Move-P retains original property-R on Move path
RM Delete-I prompt-F force Delete does not prompt-R recursive delete
DF View Partition Usage df-h (m,g) display
Kill Kill a process kill-9 force a process to kill
Hostname Display current hostname free display memory usage
Top Dynamic Computer Resource status PS View process-ef View all processes
/var/log/messages* System Run Log
/path/script name run Shell script command
./path/script name sh/path/toe
Uname-r Viewing the system version
Linux--man View Help Oracle--help view Help Q Exit view
This article is from the "Vision_g" blog, make sure to keep this source http://visiong.blog.51cto.com/10942819/1719888
Linux Learning Notes (iii) BASIC commands