Return to Snippet

Revision: 23362
at February 4, 2010 17:56 by nkm

Initial Code
#! /bin/sh

if test "$2" = ""; then
	echo "usage: $0 basedir depth"
	exit 1

if test "$2" = "0"; then
	exit 0

hash_chars="0 1 2 3 4 5 6 7 8 9 a b c d e f"
if test "$3" -a "$3" -ge "5"; then
  hash_chars="$hash_chars g h i j k l m n o p q r s t u v"
  if test "$3" -eq "6"; then
    hash_chars="$hash_chars w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - ,"

for i in $hash_chars; do
	mkdir $newpath || exit 1
	sh $0 $newpath `expr $2 - 1` $3

Initial URL

Initial Description
here's a script,, in ext/session for creating directory
tree with depth X for sessions.  As it stands, it's pretty poorly
documented and very basic.  I * got exceptionally bored and rewrote most
of it, the patch is attached.  It runs fine for me in linux (with sh
version 4.0).  I don't have any other *NIX systems to test it out on,
so I can't verify that it works in anything but linux, sorry.

* Eddie Drapkin <oorza2k5>

Initial Title [PHP]

Initial Tags
php, script, directory

Initial Language