Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-23-2009, 07:12 AM   #1
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
Copying Multiple Files

I want to copy some of the files in a directory to another directory.The files don't have any pattern.Is it possible to give multiple sources for the cp command,So that in a single command all the files given as argument in the source field will be copied.
Old 01-23-2009, 07:16 AM   #2
Senior Member
Registered: Dec 2005
Distribution: Slackware -current, 14.2
Posts: 1,085

Rep: Reputation: 195Reputation: 195

cp /path_to_file1 /path_to_file2 /path_to_file(n) /etc <destination>
I hope this is what you were looking for....

Old 01-23-2009, 07:43 AM   #3
Registered: Oct 2007
Posts: 160

Original Poster
Rep: Reputation: 30
Thanks ,
I misunderstood the man page of cp.I thought that SOURCE meant a single file.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a single file to multiple directories quest49 Linux - Software 6 12-04-2006 08:07 AM
Kaudiocreator seems to hang copying multiple files tur third Linux - Software 6 03-28-2006 03:49 PM
copying multiple different files in different directories with identical file names nickleus Linux - Software 4 03-09-2006 01:25 PM
Copying files from multiple folders into one aardwolf64 Linux - General 4 01-02-2006 11:53 PM
copying multiple files..??? krazykow Linux - Enterprise 6 09-09-2004 01:05 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration