Created
February 19, 2017 21:09
-
-
Save fffonion/a42f8612b4a76e7ecc0adafddbce27cb to your computer and use it in GitHub Desktop.
Purge orphan .sdr directory in Kindle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=$'\r\n' | |
for i in $(ls -1| grep "\.sdr"); do | |
f="${i%.*}" | |
if [[ $(ls -1| grep "$f"| wc -l) -eq 1 ]]; then | |
echo $i | |
rm -rf "$i" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment