creating subdirectories with the cp command - is it possible?

From: Colin Haffenden (Chaffend@msxi-euro.com)
Date: Tue Jul 13 2004 - 10:12:29 EDT


Hi All,

I have had a look on google and the archives but can't seem to find any
answers on this.

Does anybody know whether it is possible to create subdirectories with
the cp command?

I have been given the task of moving some data and update a database at
the same time.

I will presented with a file like...

/original_dir/text.txt /new_dir/non-existent_subdir1/nonexistent_subdir1/newtext.txt

I have added a few checks, cp and db update, but cp does not create the
new sub dirs.

I am reluctant to create all the new dirs within the same script as
there are about 3 million records and it's going to take forever to
run!

I've checked the man page and couldn't see any options that would
help.

Anyone have any ideas?

Thanks,
Colin.
This Message has been Checked at MSXI for all known Viruses.
You open this at your own risk. Please make sure all replies are
also virus free.
Also we do not accept or send Attachments of the type .exe, .vbs,
scr, or .bat due to the virus risk they can contain. These types of
attachments will be stripped from the message.

MSXI
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:04 EDT