Remove mailreturns
mailq|awk '/MAILER/ {print $1}'|xargs -n1 postsuper -d
securely delete
find ./ -type f -exec shred -n 2 -u -v -z {} \;
spamlearning
find /home/vmail/ -path *Junk/cur/* -exec sa-learn --spam {} \; -exec rm {} \; # /home/vmail is vmail-base
terminal clock
watch -t -n1 'date +"%H : %M : %S Uhr" | figlet -w 1024'
adds blanks to linestart, nice for wikifizing codes
sed 's/^/\ /g' foo > bar
get ssl certs
echo QUIT | openssl s_client -connect site:443 | sed -ne '/BEGIN CERT/,/END CERT/p'
delete pasteID from gnopaste
mysql -vv -h localhost -u c_nopaste --password='somethinweird' -D customer_nopaste -B -e "delete from pastes where cryptid='$@'";
no one needs dd
dd >/dev/sda? or dd foo of=/dev/sda? == echo foo >/dev/sda?
dd if=/dev/sda of=mbr.bin bs=512 count=1 == head -c512 /dev/sdx >mbr.sdx
dd of=/dev/sda if=mbr.sdx bs=512 count=1 == cp mbr.sdx /dev/sdx
send output of 2 scripts to sendmail
( script1; script2 ) | sendmail
update plesk hostname
/usr/share/plesk-billing/update-hostname --new-hostname $NEW --old-hostname $OLD
find users with empty password
awk -F: '($2 == "") {print}' /etc/shadow
Let's run fsck 'til no more errors found, thx to A. Dollmaier
while(true); do fsck -f -y /dev/$device && break; done
ffmpeg mov to mp4 quick and dirty
for i in $( ls *.mov | sed 's/\.[^.]*$//' ); do ffmpeg $i.mov -f mp4 -strict experimental $i.mp4 ; done