LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-28-2004, 12:52 AM   #1
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Rep: Reputation: 15
Angry CP to copy


Dear Friends,

I want to copy one directory (alongwith its contents) to another directory. I tried using cp. It conveniently omits the directories while copying. Is there any command with which I can copy (not move) the entire contents of one directory (which has inturn many child directories) to another location?

Please help me in this regard.
Thanks in Advance.
Sriram.
 
Old 10-28-2004, 12:57 AM   #2
naren
Member
 
Registered: Feb 2004
Posts: 66

Rep: Reputation: 15
hey

use cp -R <pathto sourse dir> <path o dest dir>

Bye
 
Old 10-28-2004, 12:59 AM   #3
UsualTuxpect
Member
 
Registered: Aug 2004
Location: New York
Distribution: --------- Gentoo-2004.2 [2.6.8] Redhat-9 [2.6.6]
Posts: 545

Rep: Reputation: 31
#cp -r /vvv/vvv /xxx/vvv

-r is for recursive

read the man page for more #man cp or # cp --help

OOPS!!!!
 
Old 10-28-2004, 01:02 AM   #4
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks Naren. That indeed worked as I wanted. I am accessing the Linux server from Windows environment using Telnet. I wanted this cp command for backing up of my directories. Is there any backup utility which can spawn at the linux level which will accomplish this task? I am using Mandrake 10.0.

Thanks and regards,
Sriram.
 
Old 10-28-2004, 01:47 AM   #5
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
I use tar and gzip to backup. This can be accomplished in one command:

tar czvf filename.tar.gz directory_to_back_up

Then to uncompress

tar xzvf filename.tar.gz
 
Old 10-28-2004, 04:46 AM   #6
hiteshmaisheri
Member
 
Registered: Nov 2003
Location: Kerala, India
Distribution: Red Hat, Knoppix, Mandrake, FreeBSD
Posts: 231

Rep: Reputation: 30
Darthtux, thank you for the answer you gave me a good idea for backing up files....
i generally move from partition one to another...
 
  


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
how to copy from a cd gamor Linux - Newbie 8 11-08-2005 08:28 PM
How do I copy bograt Linux - General 1 03-05-2005 04:08 PM
how to copy and paste acd copy cd paschim Linux - General 2 04-05-2004 09:25 AM
boot error after using Copy Commander to copy debian system onto larger new drive Interceptor Linux - Hardware 7 05-04-2003 12:40 PM
how to copy a cd safrout Linux - General 6 05-08-2002 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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