哈,这个问题早就发现了,不过一直以为是openoffice.org的临时文件,今天忍不住搜了一下,终于找到原因和解决办法了。
问题是这样的,由于启用了libtrash,所以正常删除的文件都会在$HOME/.Trash下面存一份,我的$HOME空间本来就十分紧张,经常发现磁盘满的情况(磁盘满了以后会有很多有意思/古怪的现象,有点意思),一看是有大量的.recently-used.xbel[?]文件在$HOME/.Trash下趴着,删除他们可以节省几百M到1G多的空间,并且丝毫不影响使用。
没有仔细观察的时候,还以为是openoffice.org开着的时候产生的临时文件,今天终于知道,用户$HOME下有两个文件:.recently-used和.recently-used.xbel,这两个文件都是xml,格式不同,但都是保存了最近打开/访问的文件。可能是我没有直接使用Gnome桌面,从来没有清除过最近文件的缘故,这两个文件的尺寸已经分别达到了200k和2.5M,尤其是那个.xbel文件,2M多,每次更新都会由于libtrash的缘故在$HOME/.Trash下存一个备份,随着时间的推移,可不就很快把硬盘吃完了么。
参考的文章中,是通过修改文件权限的方式,让系统不再往这两个文件写入内容,应该也是可行的,但和libtrash结合恐怕还是会有空文件生成,好在libtrash有黑名单功能,在/etc/libtrash.conf或者$HOME/.libtrash中:
IGNORE_RE = \.recently-used\.xbel 就行了。
关于这两个recently文件,还有两点,一是注意文件权限,可能存在泄漏用户隐私、操作习惯的问题;二是如果以前用过的文档找不到了,在这两个文件的内容中搜搜没准儿能找到。
参考
Tags: ignore, libtrash, Linux, recentRelated posts
- 选择Eclipse PHP Development Tools(PDT)作为PHP开发工具 (5)
- 用ssh打通反向隧道,内网也可对外提供服务 (2)
- 为了Linux,BT可别没喽 (5)
- virtualbox连接usb设备 (0)
- Ubuntu和手机通过蓝牙互传文件 (0)
![[Bloglines]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/bloglines.png)
![[co.mments]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/comments.png)
![[del.icio.us]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/digg.png)
![[diigo]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/diigo.png)
![[Facebook]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/facebook.png)
![[Furl]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/furl.png)
![[Google]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/google.png)
![[MySpace]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/myspace.png)
![[Reddit]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/reddit.png)
![[Rojo]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/rojo.png)
![[Slashdot]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/technorati.png)
![[Windows Live]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://www.fwolf.com/blog/wp-content/plugins/bookmarkify/email.png)