Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 21st, 2001, 02:55 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 14
How to copy all content of a directory

Okei guys

I'm pretty new to linux. I know I use cp to copy files, but how can I copy all files from one directory to another? Also, how can I create a sysbolic link?

Like I said, I'm new to this. Be gentle with me
__________________
-- Tomi Kaistila
-- Developer's Journal

The more you learn, the more you know.
The more you know, the more you forget.
The more you forget, the less you know.

Reply With Quote
  #2  
Old November 21st, 2001, 05:01 AM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level)NoXcuz User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 44 m 46 sec
Reputation Power: 25
Instead of typing all possible options you have for using cp and ln, I'll let you in on a little secret... To almost every 'program' you have in Linux, you can view the manpage for that 'program'. It's as easy as entering 'man cp' in your favourite shell. Or maybe even 'cp --help'. That'll give you lots of information on how to use it...

So use the wildcard with cp * or some option to copy multiple files, and ln-s to create symbolic links.

Happy reading...

//NoXcuz
__________________
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep

Reply With Quote
  #3  
Old November 21st, 2001, 05:06 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 14
Great! The last time I did did a smart manpage overview I received over 1000 lines of reading...


Reply With Quote
  #4  
Old November 23rd, 2001, 11:00 AM
IceMan IceMan is offline
Roving Icicle
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Netizen
Posts: 56 IceMan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
Send a message via ICQ to IceMan Send a message via AIM to IceMan Send a message via Yahoo to IceMan
Make sure you check out cp -r and ln -s
__________________
Is it just me or is it cold in here?

Reply With Quote
  #5  
Old November 23rd, 2001, 06:11 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> check out cp -r

Should it be cp -R?

Reply With Quote
  #6  
Old November 24th, 2001, 12:32 PM
telex4's Avatar
telex4 telex4 is offline
Wacky hack
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 513 telex4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 38 m 37 sec
Reputation Power: 13
Yes, it should be cp -R

What you want is:
cp * destination_path

or if it has directories within to copy too:
cp -R * desination_path

Reply With Quote
  #7  
Old November 24th, 2001, 10:16 PM
IceMan IceMan is offline
Roving Icicle
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Netizen
Posts: 56 IceMan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
Send a message via ICQ to IceMan Send a message via AIM to IceMan Send a message via Yahoo to IceMan
Quote:
Originally posted by freebsd
>> check out cp -r

Should it be cp -R?


Ugh, sorry, typo.

Reply With Quote
  #8  
Old November 25th, 2001, 03:33 PM
hiaslboy hiaslboy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Trofaiach, Austria
Posts: 1 hiaslboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to hiaslboy Send a message via AIM to hiaslboy Send a message via Yahoo to hiaslboy
RE: how to copy files (all files in a directory and not changing a thingH

I would suggest the
cp -a command to do coping if you need a real copy (symlinks stay symlinks - won't happen with cp -R !!!

Reply With Quote
  #9  
Old November 28th, 2001, 05:15 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 14
Thumbs up Gratitude

Thanks people, I got it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > How to copy all content of a directory

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap