栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

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

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

sentos7 目录核心命令 pwd-cd-ls
    • 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]#
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/333623.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号