Skip to content

Instantly share code, notes, and snippets.

@mg-code
Forked from mirontoli/remove-live-photo-videos.sh
Last active November 24, 2020 13:23
Show Gist options
  • Save mg-code/3f1be2080051ffa099e07de411586ce9 to your computer and use it in GitHub Desktop.
Save mg-code/3f1be2080051ffa099e07de411586ce9 to your computer and use it in GitHub Desktop.
#/bin/sh
find . -type f -name "*.JPG" | \
while read -r f;do [ -e "${f%.JPG}.MOV" ] && rm "${f%.JPG}.MOV";done
find . -type f -name "*.jpg" | \
while read -r f;do [ -e "${f%.jpg}.MOV" ] && rm "${f%.jpg}.MOV";done
find . -type f -name "*.JPEG" | \
while read -r f;do [ -e "${f%.JPEG}.MOV" ] && rm "${f%.JPEG}.MOV";done
find . -type f -name "*.jpeg" | \
while read -r f;do [ -e "${f%.jpeg}.MOV" ] && rm "${f%.jpeg}.MOV";done
find . -type f -name "*.HEIC" | \
while read -r f;do [ -e "${f%.HEIC}.MOV" ] && rm "${f%.HEIC}.MOV";done
find . -type f -name "*.heic" | \
while read -r f;do [ -e "${f%.heic}.MOV" ] && rm "${f%.heic}.MOV";done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment