LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[CLUG] mv and dirs...

[CLUG] mv and dirs...

R.Y.Fixer fixer at vigilante.net
Wed Mar 6 14:05:55 GMT 2002


cd /files/archives/; tar cBf - . | (cd /files/; tar  xBfpv -)
rm -rf /files/archives/dir-[1-5]




On Wed, 2002-03-06 at 13:13, Baldwin_James at emc.com wrote:
> [SORRY ABOUT PREVIOUS INCOMPLETE POST   DAMN...OUTLOOK]
> 
> Hi all...
> 
> I am baffled by something which may be simple..I must be doing something
> stupid..
> 
> I have some dirs/files I want to move into existing child directories but
> when a directory already exists for a dir I am trying to move over, mv will
> just complain with the usual (/mv: /dir/dir/dir is a directory) and it will
> fail to copy that directory and all child files/dirs within it..
> 
> Let me illustrate...
> 
> I have these which I want to move back into position..
> E.g.
> /files/archive/2001-01/<load of files>
> /files/archive/2001-02/<load of files>
> /files/archive/2001-03/<load of files>
> /files/archive/2001-04/<load of files>
> /files/archive/2001-05/<load of files>
> 
> I want to put these back into an existing directory of /files
> existing dir ls is 
> /files/2001-01/
> /files/2001-02/
> /files/2001-03/
> 
> Now, if I ' mv -i /files/archive/* /files/ '  the 2001-01,2,3 will fail with
> (mv: /files/2001-1 is a directory) but the 2001-4,5 will be fine as no dir
> currently exists for them.
> 
> 
> I am thinking of explicitly specifying filenames for the move by a find .
> -print | xargs, but is there any other way around this?
> Copy is not an option....with the F/s being 93% full
> 
> TIA,
> 
> James.
> 
> _______________________________________________
> Cork maillist  -  Cork at linux.ie
> http://www.linux.ie/mailman/listinfo/cork





More information about the Cork mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell