sentos7 目录核心命令 pwd-cd-ls

sentos7 目录核心命令 pwd-cd-ls

pwd

  1. pwd 打印当前工作路径;
    在这里插入图片描述

cd 切换目录

  1. 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]#
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值