1. mkdir 命令  
 
 格式    mkdir  - 参数 路径 / 目录名  
 
 参数  
  -p :快速创建多级目录(递归目录)  
  -v :显示创建目录的详细过程  
   例:     
 
 [root@server ~] # mkdir t1  
  [root@server ~] # mkdir t2 t3 t4  
  [root@server ~] # mkdir -p n1/n2/n3 #  多级目录 
   2. du  命令  
  作用:统计目录及文件的存储空间占用情况  
  格式:du  - 参数 目录名 
  参数  
  -a :统计磁盘空间占用时包括所有文件  
  -s :只统计每个文件所占空间大小,不统计子目录  
  -h :以易于理解的方式显示存储容量( KB MB GB) 
  如   
  
  
 [root@server ~]# 
 [root@server ~]# du -s /root
 1958072    /root
 [root@server ~]# du -sh /root
 1.9G    /root
 创建文件  
 
 1.  创建普通文件  
 
  touch 用法 1 :  
 
 如果文件已存在,则更新文件的三个时间,可以通过 stat 命令创建时间  
 
 
 
touch用法2
 如果文件不存在,则新建文件  
 
 格式: 
 
 touch  文件名  
 
 touch  文件名 1 ,文件名 2 ,文件名 3  
 
 touch  { 文件名 1 ,文件名 2 ,文件名 3}. 扩展名  
 
 
 例如: 
 
 
 
 [root@server ~] # touch h1  
  [root@server ~] # touch k1 k2 k3  
  [root@server ~] # touch {b1,b2,b3,b4}.txt  
  [root@server ~] # touch a{1,2,3,4}  
  [root@server ~] # ls  
  
  [root@server ~] # mkdir tmp  
  [root@server ~] # cd tmp  
  [root@server tmp] # ls  
  [root@server tmp] # touch abc{1..100} # 1 到 100  
  [root@server tmp] # ls 
     4. tree  
  作用:显示目录下文件的树形拓扑图及概要信息  
  格式        tree  - 参数 路径 
  参数  
  -a :显示所有文件结构及信息  
  -f :列出文件的完整路径  
  -d :只显示目录  
  -L :设置显示的最大深度:如: tree -f -L 2  
  例:按照下图完成文件的新建  
  参数  
  -a :显示所有文件结构及信息  
  -f :列出文件的完整路径  
  -d :只显示目录  
  -L :设置显示的最大深度:如: tree -f -L 2  
  例:按照下图完成文件的新建    
    
  
     
     
    
  参数  
  -a :显示所有文件结构及信息  
  -f :列出文件的完整路径  
  -d :只显示目录  
  -L :设置显示的最大深度:如: tree -f -L 2  
  例:按照下图完成文件的新建  
  
  
  
  [root@server ~] # cd /  
  [root@server /] # mkdir test  
  [root@server /] # cd test  
  [root@server test] # mkdir one public team  
  [root@server test] # cd one  
  [root@server one] # mkdir music onefile  
  [root@server one] # cd onefile  
  [root@server onefile] # touch newfile1.cfg  
  [root@server onefile] # touch newfile2.cfg  
  [root@server onefile] # touch newfile3.c  
  [root@server onefile] # ls  
  newfile1.txt newfile2.cfg newfile3.c  
  [root@server onefile] # cd ..  
  [root@server one] # cd ..  
  [root@server test] # cd public  
  [root@server public] # mkdir picture pubfile  
  [root@server public] # cd pubfile  
  [root@server pubfile] # touch newfile4.out  
  [root@server pubfile] # ls  
  newfile4.out  
  [root@server pubfile] # cd ..  
  [root@server public] # cd ..  
  [root@server test] # cd team  
  [root@server team] # mkdir project testfile tools  
  [root@server team] # cd tools  
  [root@server tools] # touch ps.txt  
  [root@server tools] # cd /test  
  用tree查看 
   [root@server test] # tree 
  
 装tree的操作 
 