BackupPC-users

Re: [BackupPC-users] rm command does not work in ArchivePreUserCmd

2008-10-23 12:18:51
Subject: Re: [BackupPC-users] rm command does not work in ArchivePreUserCmd
From: Massimiliano Masserelli <negro AT interim DOT it>
To: backuppc-users AT lists.sourceforge DOT net
Date: Thu, 23 Oct 2008 17:46:18 +0200
Pisvi Adam Goryachev! On Fri, Oct 24, 2008 at 02:15:55AM +1100 you wrote:

> Or you could do it like this (approx)
> #!/bin/bash
> find /archives/ -type f -exec rm -f {}
> (I never seem to get my find -exec commands to work properly, but it
> should work if you get the parameters right.

Maybe because you forget to add \; at the end... :P Another good way is 

find /archives -type f -print0 | xargs -0 rm

This ways xargs will cope also with files which have space chars in
their name.
-- 
Massimiliano Masserelli
-------------------------------------------------------------------------------
La realta' e' solo una conveniente misura di complessita'.
                -- Alvy Ray Smith

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/