From a66f3d1c15b9bc65fc5334828c535f97ed65a2fa Mon Sep 17 00:00:00 2001 From: Pierre Poulain Date: Wed, 28 Aug 2013 11:27:44 +0100 Subject: [PATCH] corrected typo for a better management of files with space in their name --- cheatsheets/find | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheets/find b/cheatsheets/find index 14fad01..91d4e86 100644 --- a/cheatsheets/find +++ b/cheatsheets/find @@ -14,7 +14,7 @@ find . -type f -perm 777 find . -xdev \( -perm -4000 \) -type f -print0 | xargs -0 ls -l # To find files with extension '.txt' and remove them: -find ./path/ -name '*.txt' -exec rm {} \; +find ./path/ -name '*.txt' -exec rm '{}' \; # To find files with extension '.txt' and look for a string into them: find ./path/ -name '*.txt' | xargs grep 'string'