Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Aug 2005 17:47:13 -0500
From:      Mark Kane <mark@mkproductions.org>
To:        Brian John <brianjohn@fusemail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: moving everything except a directory
Message-ID:  <4314E1F1.6060207@mkproductions.org>
In-Reply-To: <433DBEC0.1030001@fusemail.com>
References:  <433DBEC0.1030001@fusemail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian John wrote:
> Say I am at ~ and I have 10 directories inside named 1, 2, 3, 4 ,5, 6, 
> 7, 8, 9 and 10.  What command can I use to move everything but directory 
> 2? 

mv 1 3 4 5 6 7 8 9 10 new/

> What if I wanted to move everything but directories 2 and 7?

mv 1 3 4 5 6 8 9 10 new/

> I'm not sure how to use the mv command to do this in 1 comand.

man mv

SYNOPSIS
      mv [-f | -i | -n] [-v] source target
      mv [-f | -i | -n] [-v] source ... directory

-Mark






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4314E1F1.6060207>