LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-15-2003, 12:55 PM   #1
Gallienus
LQ Newbie
 
Registered: Aug 2003
Location: Miramar, Florida
Distribution: RedHat v9
Posts: 15

Rep: Reputation: 0
how to copy files/folders???


Using Linux: RHv9, I'm trying to copy a folder from one Linux directory to another. It has many (~100) files and subfolders inside: too many to copy one by one. Nautilus will not copy or move it: it just copies one subdirectlry & then fails. It doesn't give an error message: just that a check shows the files are not copied.

The text command: cp [folder] [target] will not work since I'm also copying folders.

What is the command to do an unqualifed universal copy of all files/folders in one spot to another?
 
Old 12-15-2003, 12:59 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
cp -R [folder] [new-destination]
 
Old 12-15-2003, 01:01 PM   #3
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
You need to use the -r option (recursive) with cp. Check out man cp.
 
Old 12-15-2003, 01:01 PM   #4
wayneinmpls
LQ Newbie
 
Registered: Nov 2003
Location: Minneapolis
Distribution: Slackware
Posts: 23

Rep: Reputation: 15
I believe you will find that using cp with the -r (copy down recursively) will copy everything. Example: cp -r /home/me /usr/local should copy all dirs under /home/me as well as that dir.
 
Old 12-15-2003, 01:02 PM   #5
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
........ always a nice one

cp -Rpdf
 
  


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
useing SCP to copy entire directories with sub folders? Lleb_KCir Linux - General 5 09-13-2005 10:08 PM
copy files and folders codepoet Linux - Newbie 2 06-12-2005 03:08 PM
Copy folders codepoet Linux - Newbie 4 05-12-2005 02:59 AM
How many files and folders do you got? BBB General 1 12-29-2004 03:24 AM
Mac Clients get error when copy folders to Fedora RC1 with ATALK jshelton Linux - Networking 4 05-28-2004 09:01 AM

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

All times are GMT -5. The time now is 08:10 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
Open Source Consulting | Domain Registration