文件管理:目录

pwd  显示当前所在目录

[19:51:13 root@qiyue[ bin]#pwd
/root/bin
 


cd 路径   更改所处目录

[19:54:10 root@qiyue[ bin]#cd /root/bin/4
[19:54:17 root@qiyue[ 4]#pwd
/root/bin/4
 


ls   查看当前所在目录下的内容

[08:52:53 root@qiyue[ ~]#ls
111.txt    3      4.txt     anaconda-ks.cfg  BaseOS  data       Downloads 

........

ls 路径   查看指定路径下的内容

[10:32:38 root@qiyue[ ~]#ls /root/bin
0       1.log    4      7.txt          b.sh   d.txt  

........

ls -a    额外查看隐藏文件和信息(以.为首命名的文件,是隐藏文件。)

[10:33:42 root@qiyue[ ~]#ls -a
.          3.txt             a.sh           .bashrc.save.1  .config    epel                  m3.txt                    Public   .......  

ls -l    额外显示内容的属性和详细信息

[10:34:48 root@qiyue[ ~]#ls -l
总用量 2012
-rw-r--r--  1 root root       0 7月   3 14:58 111.txt
-rw-r--r--  1 root root       0 7月   8 18:39 12345.txt
-rw-r--r--  1 root root      60 7月  14 17:18 1.txt
drwxr-xr-x  2 root root       6 7月  13 20:54 3
-rw-r--r--. 1 root root   10240 6月  16 16:20 3.tar
........


tree   显示当前所在目录的目录树装结构图

[10:38:04 root@qiyue[ bin]#tree
.
├── 0
├── 123.gz
├── 19
├── 1.log
├── 333.txt
├── 3.txt
├── 4
├── 4.txt
.........


mkdir 目录名    创建新目录

[10:39:47 root@qiyue[ 4]#mkdir 123
[10:39:51 root@qiyue[ 4]#ls
123
 


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值