All Questions
3
questions
9
votes
4
answers
41k
views
How do I perform xargs grep on grep output that has spaces?
I'm searching for files based on a regular expression, and then I'm trying to search those files for content. So, for example, I have something like
#Find all C++ files that match a certain pattern ...
63
votes
5
answers
42k
views
How to quote arguments with xargs
Suppose that I want to delete all files in a folder that are greater than 1 MB.
$ find . -size +1M | xargs -0 rm
This will not delete files that have space in their names. So I want it to quote all ...
39
votes
3
answers
5k
views
GNU find and masking the {} for some shells - which?
The man page for GNU find states:
-exec command ;
[...] The string `{}' is replaced by the current
file name being processed everywhere it occurs in the
arguments to the command, ...