find the large files through a filesytem
cd [some directory] du -ak | sort -nr | more
search for a specific string through recursively, returning context and server if the string is found…
for i in `du -ak | egrep -v \.svn | awk '{ print $2 }'` do if [[ `grep -i sstone $i` ]]; then echo "" echo __________________________________________ echo $i echo __________________________________________ grep -i sstone $i echo "" fi done
Best way to do it?
Maybe not. But both are useful. The first for finding large files, the second for tracing puppet variables down in puppet hierarchy.
find . -mtime +7 -exec rm {} \;
Finding files older than 7 days and remove. Cleaning log files…
—doug
nbsp;