SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
Shell Script Snippets
Rename multiple files:
for i in *.avi
do
j=`echo $i | sed 's/find/replace/g'`
mv "$i" "$j"
doneCan also be written on a single line as
for i in *.avi; do j=`echo $i | sed 's/find/replace/g'`; mv "$i" "$j"; doneFinding Multiple Files in a directory
Find and count how many files were modified more than 365 days ago:
find . -mtime +356 | wc -lFind and delete files that were modified more than 365 days ago:
find . -mtime +365 -exec rm {} \;Or move them to a different directory:
find . -mtime +365 -exec mv {} /path/to/destination/ \;Bulk rename some files:
for file in *.pdf; do mv $file `echo $file | sed 's/\(.*\)2011-09-29\(.*\)/\12011-10-01\2/'`; doneTechnology:
- Log in to post comments