[WBEL-users] File deletion

Kirby C. Bohling kbohling@birddog.com
Wed Jan 19 23:06:46 CST 2005


On Wed, Jan 19, 2005 at 10:55:38PM -0000, Vic wrote:
> > What I need to do is to remove the files but leave the directories intact.
> 
> Have you tried something along the lines of :-
> 
> find </path/to/deletion/site> -type f | xargs rm -f

I wouldn't do that.  The "-f" is a good idea, however, unless you
use special parameters to xargs and find, any file that has a space
in it will be a problem.  I deal with files I didn't name on a
fairly regular basis, and have learned that someone will put a
space, a comma, a tab, single quotes, double quote, and for extra
special fun dollar signs or semicolons in files names that I process
thru shell scripts.  I swear they do it just to make life harder.

	Kirby

> 
> Vic.
> 
> _______________________________________________
> Whitebox-users mailing list
> Whitebox-users@beau.org
> http://beau.org/mailman/listinfo/whitebox-users
> 



More information about the Whitebox-users mailing list