-   Programming (
-   -   Copy directory structure? (

tpe 06-01-2005 08:09 AM

Copy directory structure?
On my linux server under a 'storage' directory, I have a directory structure in the form of year/month/day/articlecategory
I have to duplicate that structure (just the structure, not the files) on a couple of other directories. Since:
a) I do not want to copy the files,
b) I do not have PHP on that server and I know too little perl to do the job,
do you know any kind of shell script that will do that?

Thank you in advance,

eddiebaby1023 06-01-2005 08:30 AM

find storage -type d -print | cpio -pvdum /name/of/target/directory

should do the trick.

tpe 06-02-2005 05:59 AM

Thank you for your answer.
I will try it and will post if it worked.

All times are GMT -5. The time now is 06:26 AM.