ubuntu Ros log文件清理

由于需要使用Ros不慎入了Ubuntu的坑,从此一去不复回,除了一些特殊情况很少再用windows。使用半年期间,/home目录常常出现空间不足。也查不到文件信息。今天才发现是由于ros的日志文件占用了36G空间。今天介绍下清理办法。

在terminal中输入

$ rosclean check
348K ROS node logs
20K rosmake logs

查看日志占用情况。

$ rosclean purge
Purging ROS node logs.
PLEASE BE CAREFUL TO VERIFY THE COMMAND BELOW!
Okay to execute:

rm -rf /u/username/.ros/log
(y/n)?

警告以上命令会从磁盘删除文件。

rosclean purge 是清理日志文件的哦!!!输入后输入y就能自动清理啦!

WARNING: use with care. This will delete files from disk!

rosclean purge will remove directories associated with storing ROS-related log files. You will be asked to confirm each deletion and it is important that you verify the command that rosclean purge executes is correct. Otherwise you may lose important files.

另外介绍一下使用 du -sh 命令查看Ubuntu硬盘文件使用情况。

12G /home/shawn

root@ubuntu:/home# du -sh /home/shawn/*

8.0K /home/shawn/atom:

172M /home/shawn/Desktop

4.0K /home/shawn/Documents

72M /home/shawn/Downloads

12K /home/shawn/examples.desktop

4.0K /home/shawn/Music

460K /home/shawn/Pictures

4.0K /home/shawn/Public

4.0K /home/shawn/Templates

4.0K /home/shawn/text.log

4.0K /home/shawn/Videos


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值