LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-23-2009, 08:12 AM   #1
babu198649
Member
 
Registered: Oct 2007
Posts: 160

Rep: Reputation: 30
Copying Multiple Files


Hi
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, 08:16 AM   #2
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.1
Posts: 1,075

Rep: Reputation: 189Reputation: 189
Indeed:

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


cheers,
 
Old 01-23-2009, 08:43 AM   #3
babu198649
Member
 
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.
 
  


Reply


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 09:07 AM
Kaudiocreator seems to hang copying multiple files tur third Linux - Software 6 03-28-2006 04:49 PM
copying multiple different files in different directories with identical file names nickleus Linux - Software 4 03-09-2006 02:25 PM
Copying files from multiple folders into one aardwolf64 Linux - General 4 01-03-2006 12:53 AM
copying multiple files..??? krazykow Linux - Enterprise 6 09-09-2004 02:05 AM


All times are GMT -5. The time now is 12:35 AM.

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