total 32 drwxr-xr-x. 2 wuqinfei wuqinfei 4096 Nov 14 18:19 Desktop drwxr-xr-x. 2 wuqinfei wuqinfei 4096 Nov 14 18:19 Documents drwxr-xr-x. 2 wuqinfei wuqinfei 4096 Nov 14 18:19 Downloads
3) ls -R : 递归显示子目录结构及文件
4) ls -ld : 显示目录和链接情况, list directory
[wuqinfei@wuqinfei ~]$ ls -ld Downloads drwxr-xr-x. 2 wuqinfei wuqinfei 4096 Nov 14 18:19 Downloads
5. 查看文件类型 file
// 切换目录
[wuqinfei@wuqinfei ~]$ cd /boot/ // 查看目录信息 [wuqinfei@wuqinfei boot]$ ls config-2.6.32-279.el6.i686 symvers-2.6.32-279.el6.i686.gz efi System.map-2.6.32-279.el6.i686 grub vmlinuz-2.6.32-279.el6.i686 initramfs-2.6.32-279.el6.i686.img [wuqinfei@wuqinfei boot]$ file vmlinuz-2.6.32-279.el6.i686 vmlinuz-2.6.32-279.el6.i686: Linux kernel x86 boot executable bzImage, version 2.6.32-279.el6.i686 (mockbuild@, RO-rootFS, swap_dev 0x3, Normal VGA [wuqinfei@wuqinfei boot]$ file initramfs-2.6.32-279.el6.i686.img initramfs-2.6.32-279.el6.i686.img: gzip compressed data, from Unix, last modified: Thu Nov 14 18:10:43 2013, max compression [wuqinfei@wuqinfei boot]$ file config-2.6.32-279.el6.i686 config-2.6.32-279.el6.i686: ASCII English text
6. 绝对路径和相对路径 cd 1) 绝对路径: 从 根目录("/") 开始. 不受当前工作目录限制
2) 相对路径: 从 当前目录 开始
3) cd 命令, 切换目录
① ".." : 上一级目录 ② "." : 当前目录 ③ "~" : 当前用户home目录(/home/用户名/), 等价于 "cd" ④ "-" : 上一个工作目录
[wuqinfei@wuqinfei ~]$ cd Downloads [wuqinfei@wuqinfei Downloads]$ pwd /home/wuqinfei/Downloads [wuqinfei@wuqinfei Downloads]$ cd .. [wuqinfei@wuqinfei ~]$ cd - /home/wuqinfei/Downloads [wuqinfei@wuqinfei Downloads]$ cd ~ [wuqinfei@wuqinfei ~]$ cd /boot/ [wuqinfei@wuqinfei boot]$ cd [wuqinfei@wuqinfei ~]$