linux服务器磁盘满了的解决方法
首先看看是不是磁盘满了:
df -lh Filesystem Size Used Avail Use% Mounted on /dev/sda5 42G 42G 20K 100% / devtmpfs 477M 0 477M 0% /dev tmpfs 488M 0 488M 0% /dev/shm tmpfs 488M 21M 468M 5% /run tmpfs 488M 0 488M 0% /sys/fs/cgroup /dev/sda2 5.0G 33M 5.0G 1% /home /dev/sda1 1014M 124M 891M 13% /boot tmpfs 98M 0 98M 0% /run/user/0
看到
/dev/sda5
确实满了
cd /
到根目录,然后
du -h max-depth=1 du: cannot access ‘max-depth=1’: No such file or directory [root@localhost /]# du -h --max-depth=1 92M ./boot 0 ./dev 60K ./home du: cannot access ‘./proc/95929/task/95929/fd/4’: No such file or directory du: cannot access ‘./proc/95929/task/95929/fdinfo/4’: No such file or directory du: cannot access ‘./proc/95929/fd/3’: No such file or directory du: cannot access ‘./proc/95929/fdinfo/3’: No such file or directory 0 ./proc 21M ./run 0 ./sys 31M ./etc 96K ./root 450M ./var 264K ./tmp 1.1G ./usr 0 ./media 7.7M ./mnt 2.5G ./opt 0 ./srv 38G ./workspace 43G .
找到那个最大的文件夹,进入,再次执行上述命令,直到找到目标文件或文件夹,将文件删除或移走
赞:(0)
踩:(0)
- 相关文章
- centos7防火墙端口设置
- 进程的内存占用及跟踪
- 热门文章
- win7中将文件拷贝到虚拟机linux下
- phpexcel设置行高及列宽,背景颜色,
- rabbitmq无法启动
- intellij idea不显示git push按钮
- php7中使用mongodb的aggregate进行
- centos7.4 64位下swoole安装及配置
- laravel页面静态化的方法
- navicate连接mycat报1184错误
- 单点登录sso原理及php实现方式及de
- devops-jenkins容器为pending状态
- 好评文章
- phpexcel设置行高及列宽,背景颜色,
- php7中使用mongodb的aggregate进行
- intellij idea打开文件所在文件夹
- windows下使用MongoDB Compass Com
- win7中将文件拷贝到虚拟机linux下
- laravel 中悲观锁 & 乐观锁的使用
- 单点登录sso原理及php实现方式及de
- navicate连接mycat报1184错误
- rabbitmq无法启动
- laravel整合dingo/api方法步骤:jwt
- 我的项目
- 【github】www.github.com/hurong241
- 【码云】gitee.com/hu_rong/projects
- 【docker hub】hub.docker.com/repositories/hurong241
- 【packagist】packagist.org/users/hurong241/packages
- 站点信息
- 建站时间:2011年
- 文章数:607篇
- 浏览数:916013