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: <>
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,


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

will do it?


< Previous Next >
Follow Ups