FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 07-15-2012, 04:18 AM
Nathaniel Homier
 
Default for i in {2..6}; do mv disc$i/* disc1; rm -rf disc$i; done - Need help making this work

for i in {2..6}; do mv disc$i/* disc1; rm -rf disc$i; done

This gives error of > @saturn:~/cng$ for i in {2..6}; do mv disc$i/*
disc1; rm -rf disc$i; done
> mv: cannot move `disc2/images' to `disc1/images': File exists
> mv: cannot move `disc3/images' to `disc1/images': File exists
> mv: cannot move `disc4/images' to `disc1/images': File exists
> mv: cannot move `disc5/images' to `disc1/images': File exists
> mv: cannot move `disc6/images' to `disc1/images': File exists

What I'm trying to do is merge 6 dir's into 1. The dir structure is -
disc1/images/

The top level dir are the same it's the files that are unique. I want
to put the files in the same dir, disc 1, disc1/images/

for i in {2..6}; do mv disc$i/* disc1;

Thanks Nate.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org