Quick Hide Script - Bash Scripting For Buffoons
Quick Hide Script
⇦ Back to 'Bash Scripting For Buffoons'
This program will whisk a collection of .jpg's from your desktop, tar and encrypt them and hide the encrypted file deep in the hidden folder hierarchy . It will also clear your '.thumbnails/normal' cache and your firefox cache all in one go. I cannot imagine why I wrote this script...it must have been a hypothetical exercise. Unless of course it has something to do with the subject of this post (sadly now defunct). It was all a long time ago. The script makes use of the ' tar ' and ' gpg ' commands. You will, of course, need to tweak it to meet your own requirements. Have fun!
#!/bin/bash
echo "" ;
echo "Enter Foldername" ;
read filename ;
mv *.jpg $filename 2> /dev/null ;
mv *.JPG $filename 2> /dev/null ;
mv *.jpeg $filename 2> /dev/null ;
mv *.JPEG $filename 2> /dev/null ;
tar cf $filename.tar $filename ;
gpg -c -a $filename.tar ;
rm -rf $filename.tar ;
rm -rf $filename ;
mv $filename.tar.asc .$filename.tar.asc ;
mv .*.tar.asc .kde/share/config/Tar2 ;
rm /home/userthree/.thumbnails/normal/*.png 2> /dev/null ;
rm /home/userthree/.mozilla/firefox/lrm26qna.default/Cache/*.png 2> /dev/null ;
echo "" ;
echo "Done" ;
echo "" ;
exit 0