Skip to content

Instantly share code, notes, and snippets.

@peter0749
Created October 31, 2019 12:00
Show Gist options
  • Save peter0749/1e571b08a190b495db901e99c1d3b3c2 to your computer and use it in GitHub Desktop.
Save peter0749/1e571b08a190b495db901e99c1d3b3c2 to your computer and use it in GitHub Desktop.
#!/bin/bash
ls imagenet_subset | while read line; do file "./imagenet_subset/$line" | grep -P "^.*: .*image data, " 1>/dev/null ; if [[ $? -ne 0 ]] ; then rm -f "./imagenet_subset/$line" ; fi ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment