Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

bash script for cleaning distfiles in gentoo

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
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS