Created
November 1, 2012 16:51
-
-
Save zerolab/3994995 to your computer and use it in GitHub Desktop.
Empty all files in a directory matching extension
This file contains 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 | |
# 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