Directory Internal Structure Creation

Matthew Nicholson sjoeboo at sjoeboo.com
Sat Oct 21 22:45:03 UTC 2006


i would just create a bash script, something like

#!/bin/bash

WORKINGDIR="/path/to/all/projects"

PROJECT=$1

mkdir $WORKINGDIR/$PROJECT
mkdir $WORKINGDIR/$PROJECT/dir1
mkdir $WORKINGDIR/$PROJECT/dir2
mkdir $WORKINGDIR/$PROJECT/dir3
mkdir $WORKINGDIR/$PROJECT/dir3/dir3-1

exit

so you would run
./$whatever-the-script-name-is newprojectname

if you wanted to get less basic, you could put all the regular dirs you
create into a lists, and iterate though the list in a for/while or
whatever you please.

 
On Sun, 2006-10-22 at 01:31 +0300, OOzy Pal wrote:
> My works is project-type deal. When a new project is started, I create
> a directory with some internal directories.
> 
> I want every time I create a directory for a project, its internal
> directories are also created.
> 
> hmm, I hope that I did not confuse you :).
> 
> -- 
> OOzy
> Kubuntu-Dapper
> 





More information about the ubuntu-users mailing list