[root@centos6 ~]#pwd
/root
(1) pwd -P 显示真实物理路径(只针对软链接而言)
[root@centos6 bin]#pwd -P
/usr/bin
(2) pwd -L 显示链接路径(默认)
[root@centos6 ~]# cd /data
[root@centos6 etc]#
[root@centos6 etc]# cd //返回当前用户家目录
[root@centos6 ~]#
[root@centos6 ~]# cd ~zhuzhuzhu //跳转至相应用户家目录
[root@centos6 zhuzhuzhu]#
[root@centos6 zhuzhuzhu]# cd - //返回刚才离开的目录(只可用一次)
/root
(1) 绝对路径:以" / "开始,拥有完整的文件位置路径
[root@centos6 ~]# cd /etc/sysconfig/
(2) 相对路径:不以" / "开始,指定相对于当前工作目录或某目录的位置
[root@centos6 etc]# ls sysconfig/
或者
[root@centos6 etc]# ls ./sysconfig
(3) 文件路径=目录名(dirname)+基名(basename)
[root@centos6 boot]# dirname /etc/sysconfig/network
/etc/sysconfig
[root@centos6 boot]# basename /etc/sysconfig/network
network
用法:ls [Options] [files_or_dirs]
(1) ls -a 显示包括隐藏文件在内的所有文件
(2) ls -l 显示包括文件权限在内的详细信息
(3) ls -R 目录递归显示
(4) ls -ld 显示目录自身的信息
access time : atime 访问时间,读取文件内容
modify time : mtime 修改时间,改变文件内容
change time : ctime 改变时间,改变元数据
[:digit:] : 任意数字,相当于0-9
[:upper:] : 任意大写字母
[:lower:] : 任意小写字母
[:alpha:] : 任意大小写字母
[:alnum:] : 任意数字或字母
原文:https://blog.51cto.com/14230230/2360857