linux常用命令

计算指定日期间文件大小总和,以m兆为单位,并输出至文件中

find ./ -type f -newermt "2023-01-01" ! -newermt "2024-01-01" -exec du -cm {} + | grep total$ | awk '{print $1}' > 1.txt

将内存中数据强制先刷新到磁盘中

sync; sleep 3; sync 清理缓存: echo 3 > /proc/sys/vm/drop_caches 

查找指定类型文件大小总和

find ./ -type f -name "*.mp4" -exec du -ch  {} + | grep total$ | awk '{print $1}'

评论

企鹅:4654081

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×