Posts

Showing posts from November, 2012

Copy Directory Structure Only

When I create folders for the new academic semester, I almost always follow the same directory structure. Courses, weeks, reading materials, assignments, exams, etc. For each course, this becomes tedious.  Since I have already done this before, why do I have to go through the same thing again and again and again? So looked around and found the following solution. The following has been tested and it works. You have the original directory structure on, lets say,  /home/tester/Documents/2012/Fall . You want to have all the directories within this under /home/tester/Documents/2012/Spring . You initially need to create the Spring directory (either via command promt- mkdir Spring -or via GUI). Then the following two commands, under linux, will create all the directories under Spring directory. # cd /home/tester/Documents/2012/Spring # (cd /home/tester/Documents/2012/Fall; find -type d ! -name .) | xargs mkdir