LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


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

Rep: Reputation: 16
Copy directory structure?


Hallo,
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,
Peter
 
Old 06-01-2005, 07:30 AM   #2
eddiebaby1023
Member
 
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, 04:59 AM   #3
tpe
Member
 
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.
 
  


Reply



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 06:23 AM
How to copy an entire directory structure except certain files? thanhvn Programming 9 01-27-2012 11:41 AM
Directory Structure fedix Linux - Newbie 3 10-14-2005 02:48 PM
"WARNING: Circular directory structure" error when deleting directory pistonbrew Linux - Software 5 02-03-2005 06:05 AM
directory structure alaios Linux From Scratch 4 04-20-2004 06:16 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:14 PM.

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