Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Aug 2001 14:57:20 -0700
From:      David Johnson <djohnson@acuson.com>
To:        leegold <leegold@operamail.com>
Cc:        freebsd-newbies@freebsd.org
Subject:   Re: Recursively copying a directory - explain please.
Message-ID:  <3B69CCC0.302A4E35@acuson.com>
References:  <3B9AAD71@operamail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
leegold wrote:
> 
> Please explain what the difference is between copying
> a directory vs. Recursively copying a directory.

Copying a directory only copies the directory and the files contained
within it. Recursively copying a directory does the same thing, and in
addition, copies any subdirectories (also recursively). The following
diagram may be useful

/fubar/testone
/fubar/testtwo
/fubar/subdir
/fubar/subdir/example
/fubar/subdir/sample
/fubar/subdir/newdir
/fubar/subdir/newdir/adinfinitem

A "cp /fubar/*" will only copy the first two items.
A "cp -r /fubar/*" will copy all of the above items.

David

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B69CCC0.302A4E35>