[ale] delete all files but leave folder structure intact

Geoffrey Myers lists at serioustechnology.com
Tue Apr 19 07:41:39 EDT 2011


Narahari 'n' Savitha wrote:
> Friends:
>  
> On the Windoze DOS world there is a command I can type del  /s /f /q xyz 
> (where xyz is a folder)..
>  
> This will delete all the files only and leaves the folder structure intact.
>  
> How can I accomplish this in the linux world ?

find $DIR -type f -print|xargs rm

>  
> Thanks
>  
> -Narahari
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo


-- 
Until later, Geoffrey

"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson


More information about the Ale mailing list