Bash Script For Cleaning Distfiles In Gentoo
Join the DZone community and get the full member experience.Join For Free
Bash script for cleaning /usr/distfiles in gentoo. Usually this folder is located in /usr/portage/distfiles, but i moved it ;) The script will delete every file, that has not been accessed in 90 days, without deleting my wifi-driver (ipw3945).
#!/bin/bash for i in \ `find /usr/distfiles -maxdepth 1 -atime +90 \ | grep -Ev "/usr/distfiles/\..*" \ | grep -v "ipw3945"` \ ; do if [ -f $i ]; then rm $i; fi done
Opinions expressed by DZone contributors are their own.