Misc. useful scripts - skw32/skw32.github.io GitHub Wiki
Bash script to zip up all WAVECARs in specified directory
#!/bin/sh
dirToZip='/home/suzannekwallace/Projects/Co_xMn_{3-x}O_4/comparisonStudy_NNandMTP/cleanedSetsABC/labelled/mySetCrelaxations'
echo "This script will zip all WAVECARs present in the directory specified in the script."
echo "Disk usage in dir before:"
du -sh ${dirToZip}
find ${dirToZip} -name "WAVECAR" | sed "s;^;gzip ;" > zip_wavecars
chmod u+x zip_wavecars
./zip_wavecars
rm zip_wavecars
echo "Disk usage in dir after:"
du -sh ${dirToZip}
Bash script to delete all WAVECARs in specified directory
#!/bin/sh
dirToDel='/home/suzannekwallace/Projects/Co_xMn_{3-x}O_4/comparisonStudy_NNandMTP/cleanedSetsABC/labelled/mySetCrelaxations'
echo "This script will delete all WAVECARs present in the directory specified in the script."
echo "Disk usage in dir before:"
du -sh ${dirToZip}
find ${dirToZip} -name "WAVECAR" | sed "s;^;rm ;" > delete_wavecars
chmod u+x delete_wavecars
./delete_wavecars
rm delete_wavecars
echo "Disk usage in dir after:"
du -sh ${dirToZip}