Avi's REST Tip #1: Resources First | Home | Posting XML as a parameter to a SOAP WebService Method

Filed under Quick Tips on March 25, 2008 by Matt Williams

Unix Directory Creation

One of the most common inefficient habits of Unix users is iterative directory creation:

$ mkdir project
$ cd project
$ mkdir docs
$ cd docs
$ mkdir html

You may (or may not) already be aware of the -p flag, which allows you to create parent AND child directories in one command:

$ mkdir -p project/docs/html

Not many people are aware, however, that you can create arbitrarily complex directory trees using the -p flag and some curly braces:

$ mkdir -p proj/{bin,etc,docs/{html,txt,pdf},src}

If the example above represented a common project layout, you could add a quick alias to .bashrc in your home directory:

alias mkproj="mkdir -p proj/{bin,etc,docs/{html,txt,pdf},src}"

Post a Comment Digg Del.icio.us

Trackback Pings (TrackBack URL for this entry)

http://www.arc90.com/cgi-bin/mt4/mt-tb.cgi/110.

Comments

Wow, great tip - thanks!!

Posted on March 25, 2008 3:12 PM by Avi Flax

Post a Comment:

Avi's REST Tip #1: Resources First | Main | Posting XML as a parameter to a SOAP WebService Method