Skip to content

Instantly share code, notes, and snippets.

@zerolab
Created November 1, 2012 16:51
Show Gist options
  • Save zerolab/3994995 to your computer and use it in GitHub Desktop.
Save zerolab/3994995 to your computer and use it in GitHub Desktop.
Empty all files in a directory matching extension
#!/bin/bash
# this example 'touches' all PDFs
for file in $(find . -type f -iname '*.pdf')
do
echo " " > $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment