Mailinglist Archive: opensuse (3378 mails)

< Previous Next >
Re: [SLE] Basic linux question - copying
  • From: Dave Smith <Dave.Smith@xxxxxx>
  • Date: Wed, 24 Apr 2002 11:00:39 +0100
  • Message-id: <20020424100039.GV8530@xxxxxxxxxxxxxx>
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.
--
David Smith Work Email: Dave.Smith@xxxxxx
STMicroelectronics Home Email: David.Smith@xxxxxxxxxxxxxxxxxxxx
Bristol, England

< Previous Next >
Follow Ups
References