学无先后,达者为师

网站首页 编程语言 正文

清理linux日志

作者:从零学习大数据 更新时间: 2023-10-16 编程语言

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

查找大文件
[root@test-os testuser]# df -h   ###查看所有block使用情况
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       8.8G  8.8G     0 100% /
tmpfs           931M     0  931M   0% /dev/shm
/dev/sda1       190M   40M  141M  22% /boot
[root@test-os testuser]# du -sh /usr/* |grep G  ###查找大文件
7.3G    /usr/local
[root@test-os testuser]# du -sh /usr/local/* |grep G
7.3G    /usr/local/bin
[root@test-os testuser]# du -sh /usr/local/bin/* |grep G
7.3G    /usr/local/bin/1g

[root@test-os testuser]# \rm -f /usr/local/bin/1g  ###删除大文件
[root@test-os testuser]# 
[root@test-os testuser]# df -h    ###接着查看发现已经解决
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       8.8G  1.5G  6.9G  18% /
tmpfs           931M     0  931M   0% /dev/shm
/dev/sda1       190M   40M  141M  22% /boot

原文链接:https://blog.csdn.net/sinat_17618381/article/details/109361474

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新