LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-19-2006, 07:54 PM   #1
Four
Member
 
Registered: Aug 2005
Posts: 298

Rep: Reputation: 30
what does it mean to copy directory's recursivly?


when using "cp" command what does it mean to copy directories recursivly? Also It apears to goto a link and copy everything in that link, which then it does it infinitly because the link can be found inside itself. I don't want to do that I just want the contents of a directory copied and no links. How may I do that?

Thank you!
 
Old 03-19-2006, 08:03 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 88
To copy recursively means that all files within a directory will be copied, and then all files within subdirectories of that directory, and so on. If you don't want cp to follow links, then add the -d flag (do not follow symbolic links). Enter cp --help for more on this.

Rob.
 
Old 03-19-2006, 08:16 PM   #3
Four
Member
 
Registered: Aug 2005
Posts: 298

Original Poster
Rep: Reputation: 30
What about deleting directories? rm also has the recursive thing. If you use it or not shouldn't it delete subdirectories?
 
Old 03-19-2006, 08:26 PM   #4
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 88
Quote:
Originally Posted by Four
What about deleting directories? rm also has the recursive thing. If you use it or not shouldn't it delete subdirectories?
Yes. Be very careful about using it. I have rm aliased to rm -i (interactive) on my PC, so that it asks before removing each file. It can be a bit annoying if you have a lot of files to remove (rm -f can be used to override this), but it can help you to avoid accidentally removing files you want to keep.

Rob

Last edited by Robhogg; 03-19-2006 at 08:34 PM.
 
  


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
directory's questions codejungle Linux - Software 3 02-21-2005 05:06 PM
change file permissions recursivly without changing permission of directories eNTi Linux - Software 8 10-15-2004 04:37 PM
program/script to ftp recursivly bmeckle Linux - General 2 08-01-2004 12:38 AM
directory's owner problem limacette Slackware 1 05-26-2004 11:14 AM
cant open different directory's (NEWBIE) knoxville Linux - Newbie 2 11-28-2003 04:23 PM


All times are GMT -5. The time now is 03:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration