linux磁盘管理命令总结

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:23   2518   0

1、ls命令
命令功能:ls----list diertory contents 列举目录内容,默认显示当前目录内容
命令格式:ls [alhRrpFt] [dirName]..
常用参数解释:-a -----do not ignore entries starting with . 显示目录下所有内容,包括以.开头的隐藏文件、.当前目录 ..上一级目录
-l-------use a long listing format 列举目录内容详细属性,包括目录类型、目录权限、硬链接数、属主、属组、大小、最后一次修改时间、文件名
-h------with -l, print sizes in human readable format (e.g., 1K 234M 2G) 配合-l参数使用,以高可读大小单位显示目录的大小属性
-R-----list subdirectories recursively 递归显示目录下可见的文件、目录及子目录
-r------reverse order while sorting 反向排序
-t------sort by modification time 目录显示按照修改时间排序
-p-----append / indicator to directories 在目录后添加/标识符
-F-----append indicator (one of */=>@|) to entries 为不同类型的目录添加唯一标识符
实例展示:
1602221-20190506103343968-752212017.png

2、mkdir命令
命令功能:mkdir --make directories 创建目录
命令格式:mkdir [-pv] directory...
常用参数解释:-p no error if existing, make parent directories as needed 递归创建多级目录
-v print a message for each created directory 显示目录创建过程
实例展示:
1602221-20190506111624026-384988997.png

3、pwd命令
命令功能:pwd------Print the name of the current working directory. 打印当前工作目录(以绝对路径方式打印)
命令格式:pwd [-P|L]
常用参数解释:一般情况下,pwd命令不带任何参数,当工作目录是链接是:
-L ----link 显示链接文件路径
-P----physical 显示链接目录的实际物理路径
实例展示:
1602221-20190506112643349-1886807392.png

4、cd命令
命令功能:cd------Change the current directory to DIR. The default DIR is the value of the HOME 切换当前目录到指定目录,默认切换到用户的家目录。
命令格式:cd [-L|-P] [dir]
常用参数解释:一般情况下,cd命令不带任何参数,和通配符.当前目录 .. 上一级目录 -最近一次目录 ~用户的家目录。当目录是链接是:
-L ----link 切换到链接文件目录中
-P----physical 切换到实际物理路径
实例展示:
1602221-20190506113850672-217875870.png

5、rmdir命令
命令功能:rmdir----remove empty directories 删除空目录
命令格式:rmdir [-pv]... DIRECTORY...
命令参数:-p ---remove DIRECTORY and its ancestors用于删除多级空目录
-v-----output a diagnostic for every directory processed 显示处理过程信息
实例展示:
1602221-20190506121728769-881468271.png

6、tree命令
命令功能:tree------list contents of directories in a tree-like format. 以倒挂树格式显示目录内容
命令格式:tree [-adL] [directory..]
常用参数解释:-a----All files are printed.显示所有目录内容,包括隐藏文件,不包括.和..
-d---- List directories only. 只显示目录
-L----Max display depth of the directory tree.按需显示目录的层数
实例展示
1602221-20190506130312986-1015560021.png

7、df命令
命令功能:df---report file system disk space usage 显示文件系统磁盘使用信息
命令格式:df [-ih] [file]
常用参数解释:-i-----list inode information instead of block usage显示磁盘inode信息
-h 以高可读性单位显示大小属性
实例展示:
1602221-20190506201406111-1998149088.png

8、stat命令
命令功能:stat----display file or file system status显示文件或文件所在文件系统状态
命令格式:stat [OPTION]... FILE
常用参数解释 -f ------display file system status instead of file status显示文件所在文件系统信息
-c------use the specified FORMAT instead of the default; output a newline after each use of FORMAT,以指定的格式获取文件或文件系统信息
-t-------print the information in terse form以简洁的形式显示文件或文件系统信息
实例展示(包含FORMAT解释)
1602221-20190506215559593-204551950.png
1602221-20190506215614507-1086473458.png
1602221-20190506215630004-1216462526.png

转载于:https://www.cnblogs.com/jian-feng/p/10818212.html

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP