LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 11-04-2002, 03:18 PM   #1
Luc
Member
 
Registered: Oct 2002
Distribution: RedHat Linux 8.0
Posts: 37

Rep: Reputation: 15
copy directorys


How to copy directorys + contents with suse linux?
 
Old 11-04-2002, 03:34 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
cp -a

So, let's say you want to copy /usr to /home/usr (which you really DON'T EVER want to do IMO)

cp -a /usr /home/usr

This should work...

Cool
 
Old 11-04-2002, 04:28 PM   #3
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 46
Also "man cp" is your friend!
-NSKL
 
Old 11-04-2002, 05:51 PM   #4
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 48
A safer way, if you want everything to be exactly the same is:

cd /path/to/source/dir
tar cf - . | (cd /path/to/destination/dir; tar xvf -)

This preserves symlinks, modification time, etc.
 
Old 11-05-2002, 03:12 AM   #5
Luc
Member
 
Registered: Oct 2002
Distribution: RedHat Linux 8.0
Posts: 37

Original Poster
Rep: Reputation: 15
cool. thx. it worked
 
  


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
RPM Directorys scripts Linux - Software 1 01-08-2005 01:36 PM
adding directorys to apache karupt Linux - Networking 2 08-12-2004 02:49 PM
I can't make files in directorys Rangerjim Linux - Newbie 2 08-03-2004 04:28 PM
vsFTPS And virtual directorys SolidSnake Linux - Networking 10 10-12-2003 05:30 AM
Protecting directorys antken Linux - Security 3 07-30-2002 10:01 AM


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