pwd 顯示當(dāng)前用戶目錄(Print Working Directory)
[root@aspen network-scripts]# pwd
/etc/sysconfig/network-scripts
cd 目錄名 切換/進(jìn)入目錄(Change Directory)
[root@aspen lib64]# cd /usr/lib64/
[root@aspen lib64]# cd ~
[root@aspen ~]# cd -
/usr/lib64
tree 目錄名 以樹形模式顯示目錄結(jié)構(gòu)
[root@aspen ~]# tree -L 1 /
/
├── bin -> usr/bin
├── boot
├── dev
├── etc
├── home
├── lib -> usr/lib
├── lib64 -> usr/lib64
├── media
├── mnt
├── opt
├── proc
├── root
├── run
├── sbin -> usr/sbin
├── srv
├── sys
├── tmp
├── usr
└── var
19 directories, 0 files
[root@aspen ~]# tree -dL 1 /etc/sysconfig/
/etc/sysconfig/
├── cbq
├── console
├── modules
└── network-scripts
4 directories
ls 目錄名 顯示目錄內(nèi)容(list)
[root@aspen ~]# ls -a ~
. .. anaconda-ks.cfg .bash_history .bash_logout .bash_profile .bashrc .cshrc .lesshst .tcshrc
[root@aspen ~]# ls ~
anaconda-ks.cfg
[root@aspen ~]# ls -d ~
/root
[root@aspen ~]# ls -ihl ~
total 16K
33595848 -rw-r--r--. 1 root root 41 May 5 09:55 1.txt
33574978 -rw-------. 1 root root 1.5K Mar 20 09:36 anaconda-ks.cfg
51336048 drw-r-----. 3 root root 34 Apr 25 10:07 aspen
33576607 -rw-r--r--. 1 root root 504 Apr 11 16:51 inittab.bak
33593153 -rw-r--r--. 1 root root 75 May 8 16:31 passwd.txt
[root@aspen ~]# ls -lrt /tmp
total 4
-rw-------. 1 root root 0 Mar 20 09:32 yum.log
-rwx------. 1 root root 836 Mar 20 09:36 ks-script-z8idLP
drwx------. 2 root root 6 Mar 20 09:36 vmware-root_5916-960608111
drwx------. 2 root root 6 Mar 29 15:03 vmware-root_6092-994685407
ls -lrt 在實(shí)際工作中常用于查看目錄下最近被修改過(guò)的文件
下一個(gè)教程:紹茨 (william E.shotts)