Linux下查看某目录或指定文件大小的命令

简介: du -sh 文件或目录名   用法:du [选项]... [文件]...   总结每个的磁盘用量,目录则取总用量。   长选项必须用的参数在使用短选项时也是必须的。   -a, --all write counts for all files, not just directories ...

du -sh 文件或目录名

  用法:du [选项]... [文件]...

  总结每个<文件>的磁盘用量,目录则取总用量。

  长选项必须用的参数在使用短选项时也是必须的。

  -a, --all write counts for all files, not just directories

  -B, --block-size=SIZE use SIZE-byte blocks

  -b, --bytes print size in bytes

  -c, --total produce a grand total

  -D, --dereference-args dereference FILEs that are symbolic links

  -h, --human-readable 以容易理解的格式印出文件大小 (例如 1K 234M 2G)

  -H, --si 类似 -h,但取 1000 的次方而不是 1024

  -k 即 --block-size=1K

  -l, --count-links 连硬链接的大小也计算在内

  -L, --dereference 找出任何符号链接指示的真正目的地

  -S, --separate-dirs 不包括子目录的占用量

  -s, --summarize 只分别计算命令列中每个参数所占的总用量

  -x, --one-file-system skip directories on different filesystems

  -X FILE, --exclude-from=FILE Exclude files that match any pattern in FILE.

  --exclude=PATTERN Exclude files that match PATTERN.

  --max-depth=N print the total for a directory (or file, with --all)

  only if it is N or fewer levels below the command

  line argument; --max-depth=0 is the same as

  --summarize

目录
相关文章
|
12小时前
|
安全 网络协议 Linux
linux必学的60个命令
Linux是一个功能强大的操作系统,提供了许多常用的命令行工具,用于管理文件、目录、进程、网络和系统配置等。以下是Linux必学的60个命令的概览,但请注意,这里可能无法列出所有命令的完整语法和选项,仅作为参考
|
15小时前
|
监控 Linux 数据处理
|
15小时前
|
编解码 Ubuntu Linux
|
21小时前
|
JSON Linux 数据格式
Linux命令发送http
请注意,`curl`命令非常灵活,可以根据您的需求进行多种配置和自定义。您可以查看 `curl`命令的文档以获取更多详细信息。
4 0
|
1天前
|
Linux Shell
Linux操作系统下查找大文件或目录的技巧
Linux操作系统下查找大文件或目录的技巧
|
2天前
|
域名解析 Unix Linux
AIX上如何正确挂载Linux 的nfs共享目录分享篇
AIX上如何正确挂载Linux 的nfs共享目录分享篇
|
2天前
|
安全 Linux 测试技术
|
2天前
|
安全 Linux Windows
Linux中Shutdown命令使用介绍
Linux中Shutdown命令使用介绍
|
3天前
|
缓存 关系型数据库 Linux
Linux目录结构:深入理解与命令创建指南
Linux目录结构:深入理解与命令创建指南
|
3天前
|
数据挖掘 Linux vr&ar
Linux命令实战:解决日常问题的利器
Linux命令实战:解决日常问题的利器