Created
November 21, 2014 10:22
-
-
Save ebouchut/53610a63cb6e6e79c386 to your computer and use it in GitHub Desktop.
Remove files whose name contain a space using find and xargs
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
# I use find -print0 and xargs -0 when the filenames contain characters used as delimitors, | |
# like space in this case | |
# | |
find '/tmp/temp results' -name '*.tmp' -print0 | xargs -0 -n 1 -J % rm '%' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment