PATH
< echo $PATH > //Show your environment variable values
PATH This is the variable name, ECHO is the command to display the information in the console
$ here is the value of getting a variable, path is the variable name
Together, the value of the PATH environment variable is displayed in the console.
[Email protected] ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
< path= $PATH:/tmp/> Add/tmp Path to environment variable---TEMP!!!
(1) Copy a/TMP/LS2
(2) Join the path
(3) LS2 is supported but temporary
(4) Edit File profile finally added path= $PATH:/tmp/saved to be permanent.
(5) Input path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin Cancel/tmp
(6) Open file Double click dd Delete profile add last line to save
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= " Https://s4.51cto.com/wyfs02/M01/9E/15/wKiom1mK-m-A0jyPAABrCFC2pXI200.png-wh_500x0-wm_3-wmp_4-s_522157010.png " Title= "11.png" alt= "Wkiom1mk-m-a0jypaabrcfc2pxi200.png-wh_50"/>
----------------------------------------------------------------------------------------------
CP Copy
<cp/etc/passwd/tmp/1.txt > Copy files
<CP- R /tmp/aminglinux/ /tmp/aminglinux2 > Copy directory Note directory Plus-R and/
<tree!$> Call the last argument of the last line above
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
CP and RM and MV actually have the-I copy directory when asked whether overwrite want to not prompt can use absolute path </USR/BIN/CP >
CP Copy directory when the current directory already exists will produce a new directory under the current directory
----------------------------------------------------------------------------------------------
MV Move
<mv/tmp/1.txt/tmp/aminglinux/2.txt > Move and change names
<mv/tmp/aminglinux/2.txt/tmp/ > moving files to the directory
Move Directory If the current directory already exists will be moved to the current directory
---------------------------------------------------------------------------------------
2.13 Viewing text
(1) Cat See file Contents TAC Flashback view File contents
<cat-a initial-setup-ks.cfg > Line Tail +¥
<cat-n initial-setup-ks.cfg > Display line number
(2) More
<more initial-setup-ks.cfg > One screen display
<CAT/ETC/PASSWD >>anaconda-ks.cfg> append files to another file
Space: down Ctr+b: Up
(3) WC
<wc-l anaconda-ks.cfg > Display the number of file lines
(4) Less is best used
Same as more but supports mouse, arrow keys
See Q Exit;/system highlight n back to highlight shitf+n forward;? The system looks from the back forward;
SHITF g to row position, G to the beginning of the line
(5) Head
(6) Tail
<tail-n 2 anaconda-ks.cfg > View end of File two lines
<tail-f anaconda-ks.cfg > Dynamic viewing of File contents--View dynamic logs frequently
--------------------------------------------------------------------------------------
2.14 File and Directory permissions
chmod Modify Permissions
Eg:d rwx r-x r-x. R=4;w=2;x=1; so =755.
D: Top 3 of the catalogue: 3 of the owner's permissions: 3 after all group permissions: other than the two.
RWX: Read, Write, execute
. : The last one has a point that is subject to SELinux
(1) Modify 1.txt permissions note Display permissions and then the file name
<chmod 777 Aming/1.txt>
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/9E/15/wKiom1mK-zHgqQCjAABppIEYoaE545.png-wh_500x0-wm_ 3-wmp_4-s_2536615037.png "title=" 22.png "alt=" Wkiom1mk-zhgqqcjaabppieyoae545.png-wh_50 "/>
(2) Bulk modify directory and its directory content permissions
<chmod-r 770 aming/>
(3) Intuitive way to modify permissions
< chmod u=rwx,g=r,o=r aming/>
(3) All rights + one
< chmod a+x aming/>
Same < chmod a=x aming/> All Permissions x
Empathy < chmod a-x aming/>
Empathy < chmod u-x aming/>
------------------------------------------------------------------------------------
2.15 Changing owners and groups
Chown Modifying Owner permissions
CHGRP Modify the owning group permissions
< cat/etc/passwd > View created Users
Malt:x:1000:1000:malt:/home/malt:/bin/bash
Iammalt:x:1001:1001:iammalt:/home/iammalt:/bin/bash
(1) < chown iammalt/tmp/aminglinux > change owner only
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/9E/15/wKiom1mK-1ryGA3lAAAuHyuZa6Q319.png-wh_500x0-wm_ 3-wmp_4-s_741536380.png "title=" 55.png "alt=" Wkiom1mk-1ryga3laaauhyuza6q319.png-wh_50 "/>
(2) < chgrp malt/tmp/aminglinux > modify the owning group
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>
(3)) < Chown malt:iammalt/tmp/aminglinux > change owners and Groups
< Chown:iammalt/tmp/aminglinux > Change Group only
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/9E/15/wKioL1mK-2fy_h7oAABB14Wx2q4314.png-wh_500x0-wm_ 3-wmp_4-s_2016959702.png "title=" 66.png "alt=" Wkiol1mk-2fy_h7oaabb14wx2q4314.png-wh_50 "/>
(4) < chown-r malt:iammalt/tmp/aminglinux > change owner and group include his internal files
This article is from "Malt's Sky" blog, be sure to keep this source http://iammalt.blog.51cto.com/12054231/1954929
Learn Linux lesson two with Amin Linux file and directory Management (2)-directives