Re: copying files in linux



On Wed, 20 May 2009 18:05:14 -0400, Baho Utot wrote:

On Wed, 20 May 2009 14:56:04 -0700, Magician wrote:

Hi,
I tried the command

cp g6.tgz A/B/C
cp: cannot create regular file `A/B/C': No such file or
directory


but it did not work. the directories A & B do not exist.

Hint that is why it did not work ^^^^^^^^^^^^^^^^^^

How to copy files when target folders do not exist?

mkdir -b /A/B/C

Opps should have been mkdir -p /A/B/C


cp g6.tgz A/B/C

copies g6.tgz into /A/B/C

.