Koozali.org: home of the SME Server

Using CP Command on SME

Byte

Using CP Command on SME
« on: July 30, 2003, 08:50:44 PM »
Hi,

I am having a bit of trouble using the cp command does anyone know why it keeps omitting directorys?

I would like to copy directory without having dir after dir of the same folders )I get that when I use the cp -a which I know cause's the folders to be replicated

What I want is to see if directory is there if not create it, then copy files to that dir.

I have done alot of googling around without any success.


TIA

Byte

RayG

Re: Using CP Command on SME
« Reply #1 on: July 30, 2003, 11:48:37 PM »
Searching for the manual pages on google works pretty well. Searching for something like "man cp" will turn up plenty of sources for good descriptions of the options.

If I understand what your trying to do, "cp -R" might be the way to go. Keep in mind that case is important with LINUX.

Rich

Re: Using CP Command on SME
« Reply #2 on: July 31, 2003, 02:32:48 PM »
I hold a bit of a candle for rsync for this type of thing. It is perfectly happy to copy from area to area on the same host, and can do lots of fancy conditions - it should also run quickly if your data doesn't change very much,


Just a thought.

cydonia

Re: Using CP Command on SME
« Reply #3 on: May 10, 2004, 02:55:15 PM »
Quote from: "RayG"


If I understand what your trying to do, "cp -R" might be the way to go. Keep in mind that case is important with LINUX.



thank you!  this just got me around my problem where it was saying "omitting directory".  Hopefully this will help others too...