摘要: 想要找到占用磁盘最多的文件或目录,可以使用du和sort命令: du -h /path/to/directory | sort -rh | head -n 10 其中: du -h /path/to/directory 用于计算指定目录下的所有文件和子目录的大小,并以人类可读的格式显示。 sort 阅读全文
posted @ 2024-10-22 12:01 lclc 阅读(97) 评论(0) 推荐(0) 编辑
摘要: shell脚本 shell脚本就是一些命令的集合 #!/bin/bash echo "文件开头代表:该文件使用的是bash语法" 一、运行.sh文件 方法一:当前文件执行.sh 文件 # 文件必须含有x执行权限 [文件赋x权限:chmod u+x hello.sh] ./test.sh # 文件可以 阅读全文
posted @ 2024-10-22 11:59 lclc 阅读(11469) 评论(0) 推荐(1) 编辑