1,ls CommandLS used to print out the current directory of the list ls-l/-h/-a-h humanized display-A with hidden files are shown in the-F executable special display band *
[[email protected] test4]$ lsfile file1 folder folder2 folder3[[email protected] test4]$ touch. Haha[[email Protected] test4]$ lsfile file1 folder Folder2 Folder3
[Email protected] test4]$ ls-a
. .. File file1 folder Folder2 Folder3. Haha[[email protected] test4]$ ls-lhtotal 12K-rw-r--r--1Ligang trainning0Mar8 to: -file-rw-r--r--1Ligang trainning0Mar8 to: inFILE1DRWXR-xr-x2Ligang trainning4.0K Mar8 to: inFOLDERDRWXR-xr-x2Ligang trainning4.0K Mar8 to: -FOLDER2DRWXR-xr-x2Ligang trainning4.0K Mar8 to: infolder3[[email protected] test4]$ ls-Latotal -drwxr-xr-x5Ligang trainning4096Mar8 .: ,. drwx------ theLigang trainning4096Mar8 Geneva: A ..-rw-r--r--1Ligang trainning0Mar8 to: -file-rw-r--r--1Ligang trainning0Mar8 to: inFILE1DRWXR-xr-x2Ligang trainning4096Mar8 to: inFOLDERDRWXR-xr-x2Ligang trainning4096Mar8 to: -FOLDER2DRWXR-xr-x2Ligang trainning4096Mar8 to: inFolder3-rw-r--r--1Ligang trainning0Mar8 .: ,. Haha[[email protected] test4]$ ls-lahtotal 20Kdrwxr-xr-x5Ligang trainning4.0K Mar8 .: ,. drwx------ theLigang trainning4.0K Mar8 Geneva: A ..-rw-r--r--1Ligang trainning0Mar8 to: -file-rw-r--r--1Ligang trainning0Mar8 to: inFILE1DRWXR-xr-x2Ligang trainning4.0K Mar8 to: inFOLDERDRWXR-xr-x2Ligang trainning4.0K Mar8 to: -FOLDER2DRWXR-xr-x2Ligang trainning4.0K Mar8 to: inFolder3-rw-r--r--1Ligang trainning0Mar8 .: ,. haha
2,dir switch current directory to DirnamE
cd/cd~ back to User home directory CD/Enter system root CD-return to the directory before entering this directory
[[Email protected] test4]$ CD//~]$ [[email protected] soft]# pwd/opt/-/~ ]# pwd/~]# CD-/opt/soft[[email protected] soft]#
3,pwd pwdcommand to view the full path of the current working directoryPWD shows the connection path pwd-p shows the actual path/bin/pwd option
[[email protected] init.d]$ pwd/etc//bin/pwd/etc/rc.d/init.d[[email protected] init.d]$ pwd/etc/-L/etc/-P/ETC/RC.D/INIT.D
Linux commands (LS, cd,pwd)