[Linux-disciples] delete a whole lot of files
Adam Rosi-Kessel
adam at rosi-kessel.org
Wed Feb 7 13:28:36 EST 2007
On 2/7/2007 1:24 PM, Dylan Thurston wrote:
> On Wed, Feb 07, 2007 at 01:16:22PM -0500, Adam Rosi-Kessel wrote:
>> find /home/church -iname '*.jpg' -print0 -exec '{}' rm \;
> Why -print0? If you want to monitor the progress, you want just
> -print, right?
The confusion on our end was mixing up -print and -exec. You want
-print0 piped into | xargs -0 so that you can avoid dealing with
escaping in the filenames. (Since the filenames were created with
recoverjpeg in this instance, it's probably an unnecessary precaution).
More information about the Linux-disciples
mailing list