Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-01-2005, 08:09 AM   #1
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Rep: Reputation: 16
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,
Old 06-01-2005, 08:30 AM   #2
Registered: May 2005
Posts: 378

Rep: Reputation: 33
find storage -type d -print | cpio -pvdum /name/of/target/directory

should do the trick.
Old 06-02-2005, 05:59 AM   #3
Registered: Oct 2004
Location: Athens, Greece
Distribution: Suse Linux
Posts: 98

Original Poster
Rep: Reputation: 16
Thank you for your answer.
I will try it and will post if it worked.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Directory Structure Only ronin1 Linux - Newbie 10 06-08-2013 07:23 AM
How to copy an entire directory structure except certain files? thanhvn Programming 9 01-27-2012 12:41 PM
Directory Structure fedix Linux - Newbie 3 10-14-2005 03:48 PM
"WARNING: Circular directory structure" error when deleting directory pistonbrew Linux - Software 5 02-03-2005 07:05 AM
directory structure alaios Linux From Scratch 4 04-20-2004 07:16 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration