如果你通过 --block-size 选项设置了块大小,那么,这就会成为你 du 输出信息的单位。 假如上一条没满足,且你设置了环境变量 DU_BLOCK_SIZE,则这会成为你 du 输出信息的单位。 假如上两条都没满足,且你设置了环境变量 BLOCK_SIZE,则这会成为你 du 输出信息的单位。 假如前三条都没满足,且你设置了环境变量 BLOCKSIZE,则这会
否则,默认单位是1024字节(或是512,若设定 POSIXLY_CORRECT 的话)。 SIZE 可以是一个可选的整数,后面跟着以下单位中的一个: KB1000,K1024,MB1000*1000,M1024*1024,还有 G、T、P、E、Z、Y。 du常见命令展示 查看目录下所有文件的大小 # 查看目录下所有文件的大小并按照大小排序 du-sh * | sort -rh 查看...
By piping the output to thesort command. And in this tutorial, I will share several examples of how you sort the output by size. How to sort du command output As I mentioned earlier, the du command does not have a built-in functionality to sort output so you'll have to pipe it to ...
du with sort 根据size排序(逆序) ls 检查当前目录中的文件的大小 du 检查文件大小 du: without seeing the details of the various subdirectories du apparent size apparent size & disk usage si...
> du -c a.log b.log 4 a.log 0 b.log 4 total 加上-c选项后,du不仅显示两个目录各自占用磁盘空间的大小,还在最后一行统计它们的总和。 按照空间大小排序 > du -ah src | sort -nr 108K ./src 108K . 52K ./src/one 48K ./src/one/etc.tar.gz 12K ./src/nohup.out 12K ./src/bin/ru...
du -shc /opt/*:列出opt目录下所有直接目录和文件的大小及其和; du -ma /opt/* | sort -rn | head -n 10:统计当前目录下前10大的文件和目录; 3、iostat命令 描述:展示CPU和IO统计信息 参数:常用的参数 h:Make the Device Utilization Report easier to read by a human ...
常用选项组合为:du -sh 一、du的功能:`du` reports the amount of disk space used by the specified files and for each...-c:显示几个目录或文件占用的磁盘空间大小,还要统计它们的总和 --apparent-size:显示目录或文件自...
1,048,576 bytes; see SIZE format below -B, --ignore-backups do not list implied entries ending with ~ -c with -lt: sort by, and show, ctime (time of last modification of file status information); with -l: show ctime and sort by name; ...
du会显示指定的目录或文件所占用的磁盘空间。用于查看当前目录的总大小。 # 通过排序的方式显示前十条 [root@localhost ~]# du -am | sort -nr | head -n 10 183 ./jdk-8u191-linux-x64.tar.gz 183 . 1 ./.viminfo ... 3、压缩/解压tar命令 tar是用来建立,还原备份文件的工具程序,它可以加入...
du [options] [path]Useful du options:-h –Display file sizes in human-readable format like K for Kilobytes rather than a byte count. Much easier to parse. -s –Only show the total size for a directory, rather than listing each subdirectory and file. Good for summary. -a –Show ...