Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 22nd October 2010, 11:18 AM
toys19 Offline
Registered User
 
Join Date: Apr 2008
Posts: 94
linuxfedorafirefox
Stripping folders from files?

Hi I have 70 folders as an output form some software they are called folder1, folder2 ...folder70.

I want to find a way to automatically copy the contents from each folder to one big folder? So all the files are in one folder without the directories?

I was thinking of something using the mv command but I'm not sure how to do this..

---------- Post added at 02:18 AM GMT ---------- Previous post was at 01:45 AM GMT ----------

Ok I think I have answered my own question. I did this:

# cp folder*/* bigfolder

I used cp in case it went wrong, it worked so I deleted the previous dir's.

Last edited by toys19; 22nd October 2010 at 10:48 AM.
Reply With Quote
  #2  
Old 22nd October 2010, 12:49 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,089
linuxfedorafirefox
Re: Stripping folders from files?

As a comment, using "cp folder*/* bigfolder" ASSUMES that the names
in each directory are unique. If they are not, then only the last file with
the same name will exist in "bigfolder".

This also applies to using "mv" instead. In this case though, the
pre-existing files in "bigfolder" are deleted.
Reply With Quote
  #3  
Old 22nd October 2010, 03:28 PM
toys19 Offline
Registered User
 
Join Date: Apr 2008
Posts: 94
windows_98_nt_2000firefox
Re: Stripping folders from files?

Good point thanks.
Reply With Quote
Reply

Tags
files, folders, stripping

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sharing files and folders - how to? Sematary Servers & Networking 10 18th March 2010 11:11 PM
Copying files/folders to CD hmclaurin Guides & Solutions (No Questions) 7 18th April 2007 02:23 PM
Stripping RedFedora Using Fedora 1 27th March 2006 02:03 PM
New files and folders not showing up dndfan Using Fedora 1 5th November 2005 04:57 PM


Current GMT-time: 11:33 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat