Mailinglist Archive: opensuse (3378 mails)

< Previous Next >
Re: [SLE] Basic linux question - copying
  • From: Nick Selby <php@xxxxxxxxxxxxx>
  • Date: Wed, 24 Apr 2002 12:31:52 +0200
  • Message-id: <5.0.0.25.2.20020424123053.02f50228@xxxxxxxxxxxxxxxxxx>
At 11:00 AM 4/24/2002 +0100, you wrote:
On Wed, Apr 24, 2002 at 11:29:45AM +0200, php@xxxxxxxxxxxxx wrote:
> Hi,
> I have a directory under the /html root of my web server, and I'd like to
> simultaneously copy recursively this directory and rename it to the same
> /html root.
>
> I understand that I can first create a new directory, test1, and then cd
> into the directory I want to copy recursively and do
>
> cp -R * ../test1
>
> but is there an easier way? Someting like
>
> copy -R source-folder-name new-folder-name

cp -R can copy directories like this. However, you might like to use
cp -a instead, as it preserves symbolic links and permissions.

Thanks, Dave,

So

cp -a source-folder-name new-folder-name

will do it?

TIA,
Nick


< Previous Next >
Follow Ups
References