LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-07-2002, 12:11 PM   #1
rlkiddjr
Member
 
Registered: Feb 2002
Distribution: FreeBSD 4.9
Posts: 69

Rep: Reputation: 15
Copy Command


What is the correct syntax for coping all the files from one directory to another from a shell. I need to set this up as a cron job, but I just need to know the syntax.

Thanks,
Lee
 
Old 05-07-2002, 12:18 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
usually just a cp /dir/you/want/to/copy /dir/to/copy/to should do the job just fine.

man cp for more options.
 
Old 05-07-2002, 01:37 PM   #3
taz.devil
Senior Member
 
Registered: Nov 2001
Location: Wa. State
Distribution: Slackware
Posts: 1,261

Rep: Reputation: 45
I know that the mv command will do the recursive stuff but I am thinking that cp needs the -R command to do it all correctly. eg.
cp -R /home/user/downloads /backup/directory
I stand corrected if this is not true as a MUST, though it does work and do what you are needing.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Symlinks and the copy command gbj Linux - General 5 10-31-2004 03:37 PM
copy command with out prompt imsajjadali Red Hat 4 05-30-2004 11:42 PM
copy and paste in with command exper Linux - Software 1 12-26-2003 09:28 AM
copy a cd from the command line illtbagu Linux - General 32 02-09-2003 07:08 PM
right click has no copy command murshed Linux - General 4 12-25-2002 10:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:23 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