LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1517|回复: 4

[求助]如何清理/usr/portage/distfiles 且不删除从gentoo的ftp以外地方下的文件?

[复制链接]
发表于 2007-12-17 10:33:07 | 显示全部楼层 |阅读模式
一般从gentoo的ftp下文件都很快,但那些像icc的包要从其他地方下文件,可能会比较慢。

当清理/usr/portage/distfiles 时,我想对gentoo的ftp下的只保留最新版;甚至把其中大的文件,比如openoffice的全部删掉。 对从其他地方下的,我需要全部保留,免得日后又要下半天;对多版本,至少也要列一下让我自己判断是否删除。

有没有实现这些要求的方法?
发表于 2007-12-17 10:44:16 | 显示全部楼层
我每次都直接删掉。
回复 支持 反对

使用道具 举报

发表于 2007-12-17 11:04:32 | 显示全部楼层
应该可以用eclean实现吧,具体不太清楚,看看eclean的man吧!
回复 支持 反对

使用道具 举报

发表于 2007-12-17 16:26:03 | 显示全部楼层
eclean-dist -p
查看确定后删除。
  1. Usage:
  2. eclean-pkg [global-option, packages-option] ...
  3. eclean-pkg [--help, --version]
  4. Available global options:
  5. -C, --nocolor             - turn off colors on output
  6. -d, --destructive         - only keep the minimum for a reinstallation
  7. -e, --exclude-file=<path> - path to the exclusion file
  8. -i, --interactive         - ask confirmation before deletions
  9. -n, --package-names       - protect all versions (when --destructive)
  10. -p, --pretend             - only display what would be cleaned
  11. -q, --quiet               - be as quiet as possible
  12. -t, --time-limit=<time>   - don't delete files modified since <time>
  13.    <time> is a duration: "1y" is "one year", "2w" is "two weeks", etc.
  14.    Units are: y (years), m (months), w (weeks), d (days) and h (hours).
  15. -h, --help                - display the help screen
  16. -V, --version             - display version info
  17. Available options for the packages action:
  18. NONE  :)
复制代码
回复 支持 反对

使用道具 举报

发表于 2007-12-17 19:34:26 | 显示全部楼层
我把不是从gentoo ftp 上下的东西移动到另外一个地方
然后再 ln -s 做链接到 /usr/portage/distfiles
这样就可以直接 rm -f  /usr/portage/distfiles/* 了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表