border

[Technic] linux help

Ricky Nance ricky.nance at weaubleau.k12.mo.us
Thu Jul 12 08:46:23 CDT 2007


mkdir /dir1.bak; mv /dir1/save1 /dir1.bak; mv /dir1/save2 /dir1.bak; rm dir1
-fdr (use with caution!!!); mv dir1.bak dir1

Should work fine.

Ricky Nance

On Thu, 12 Jul 2007 08:28:57 -0500, Scott Mayo wrote
> Is there a quick command to delete everything in a directory except 
> for certain directories?
> 
> i.e.  I have the directory /dir1 which contains a bunch of files and 
> other directories.  I want to delete everything in /dir1 except the 
> directories 'save1' and 'save2'.
> 
> Thanks.
> 
> -- 
> Scott Mayo
> System Administrator
> Bloomfield Schools
> PH: 573-568-5669
> FA: 573-568-4565
> Pager: 800-264-2535 X2549
> 
> Duct tape is like the force, it has a light side and a dark side and 
> it holds the universe together. _______________________________________________
> Technic mailing list
> Technic at lists.more.net
> http://lists.more.net/mailman/listinfo/technic


Ricky Nance



More information about the Technic mailing list