LinuxQuestions.org
Help answer threads with 0 replies.
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 04-27-2007, 07:46 AM   #1
king123
LQ Newbie
 
Registered: Jul 2006
Posts: 5

Rep: Reputation: 0
copy file in linux


how to copy a single file to five different directories
using single command
 
Old 04-27-2007, 08:42 AM   #2
i_grok
Member
 
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79

Rep: Reputation: 16
I don't know if this is the best way, but it works.

Code:
for i in dir1 dir2 dir3 dir4 dir5; do cp myFile $i & done
This is bash shell scripting.
 
Old 04-27-2007, 09:16 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
You should have posted this in the Linux Newbie forum. This forum is for making suggestions for the Linux Questions website.
 
Old 04-30-2007, 09:21 AM   #4
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 12,355

Rep: Reputation: 3262Reputation: 3262Reputation: 3262Reputation: 3262Reputation: 3262Reputation: 3262Reputation: 3262Reputation: 3262Reputation: 3262Reputation: 3262Reputation: 3262
Moved: This thread is more suitable in Linux - Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.

--jeremy
 
  


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
video file copy (linux unable) Ammad Linux - General 1 01-19-2006 06:49 AM
How do I copy a AVI file to DVD with LInux?? Nadinesky Linux - Software 5 08-23-2005 07:19 PM
Linux to windows file copy... Wha?Where? Linux - Newbie 1 07-12-2005 10:41 AM
how to copy file in linux to floppy disk aiyong Linux - Newbie 3 10-17-2003 05:26 PM


All times are GMT -5. The time now is 12:07 PM.

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