cd 目录名称
cd .. ##进入当前目录的上层目录
cd - ##进入当前目录之前所在目录
4.文件的显示
ls
ls -a ##显示所有文件包括以点开头的隐藏文件
ls -R ##递归显示目录中的所有内容
ls -l == ll ##显示详细信息
实例:
[root@localhost ~]# ls -a
. .bash_logout .config Downloads Music .tcshrc
.. .bash_profile .cshrc .esd_auth Pictures Templates
anaconda-ks.cfg .bashrc Desktop .ICEauthority Public Videos
.bash_history .cache Documents .local .ssh .viminfo
[root@localhost ~]# ls -l
total 16
-rw-------. 1 root root 8619 May 6 2014 anaconda-ks.cfg
drwxr-xr-x. 2 root root 16 Apr 6 20:59 Desktop
drwxr-xr-x. 2 root root 6 Apr 4 07:19 Documents
drwxr-xr-x. 2 root root 6 Apr 4 07:19 Downloads
drwxr-xr-x. 2 root root 6 Apr 4 07:19 Music
drwxr-xr-x. 2 root root 4096 Apr 6 10:54 Pictures
drwxr-xr-x. 2 root root 6 Apr 4 07:19 Public
drwxr-xr-x. 2 root root 6 Apr 4 07:19 Templates
drwxr-xr-x. 2 root root 6 Apr 4 07:19 Videos
[root@localhost ~]# ls -d
.
[root@localhost ~]# ls -dl
dr-xr-x---. 14 root root 4096 Apr 6 20:45 .
[root@localhost ~]# ls -R
.:
anaconda-ks.cfg Documents Music Public Videos
Desktop Downloads Pictures Templates
./Desktop:
lie
./Documents:
./Downloads:
./Music:
./Pictures:
Screenshot from 2018-04-06 10:34:10.png Screenshot from 2018-04-06 10:40:46.png
./Public:
./Templates:
./Videos:
[root@localhost ~]#