Select Page

Bash Script Hosts file Ad Blocker

Put in cron or run manually. #!/bin/bash # If this is our first run, save a copy of the system’s original hosts file and set to read-only for safety if [ ! -f /etc/hosts.bak ] then echo “Saving copy of system’s original hosts file…” sudo...

Driftnet – misc scripts

#!/bin/bash mpixW=250 mpixH=300 if [ “x`which identify`” != x ] ; then echo `which identify` found! echo Tossing images less than $mpixW pixels. while true ; do read img imgType=$( expr `identify -format ‘%e’ “$img”` ) if [...

Sort files by date to directory

echo “Please wait while I sort your files by date.” for a in *.jpeg; do date -r $a +%y%m%d >/dev/null && { dof=$(date -r $a +%y%m%d) if [ ! -d $dof ]; then mkdir $dof fi mv $a $dof/ }...