- pwd
- cd 切换目录
- ls 查看目录下面内容
- pwd 打印当前工作路径;
- cd 切换目录 change directory;
[root@VM_16_14_centos ~]# cd /tmp [root@VM_16_14_centos tmp]# pwd /tmp [root@VM_16_14_centos tmp]#ls 查看目录下面内容
-l 长格式(long) 查看内容属性
文件和文件属性(大小,创建时间, 用户, 用户组,权限)
-a 显示所有文件
-d 显示目录本身
[root@VM_16_14_centos www]# ls -d wwwroot wwwroot [root@VM_16_14_centos www]# ls -ld wwwroot drwxr-xr-x 10 www www 4096 Aug 26 11:13 wwwroot
隐藏文件,以.开头文件
.表示当前用户所在目录
..表示当前用户所在目录的上级目录
~表示当前用户的家目录
[root@VM_16_14_centos tmp]# cd / [root@VM_16_14_centos /]# whoami root [root@VM_16_14_centos /]# cd ~ [root@VM_16_14_centos ~]# pwd /root
-表示上次所在目录
[root@VM_16_14_centos /]# cd www/wwwroot [root@VM_16_14_centos wwwroot]# cd / [root@VM_16_14_centos /]# cd - /www/wwwroot [root@VM_16_14_centos wwwroot]#



