Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2009 10:14:33 +0200
From:      Jonathan McKeown <j.mckeown@ru.ac.za>
To:        freebsd-questions@freebsd.org
Subject:   Re: Need a filesystem with "unlimited" inodes
Message-ID:  <200906111014.33706.j.mckeown@ru.ac.za>
In-Reply-To: <20090610190606.6B89ABEDB@kev.msw.wpafb.af.mil>
References:  <20090610190606.6B89ABEDB@kev.msw.wpafb.af.mil>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wednesday 10 June 2009 21:06:06 Karl Vogel wrote:
> Create 256 folders named 00-ff:
>
>        #!/bin/sh
>        hex='0 1 2 3 4 5 6 7 8 9 a b c d e f'
>        for x in $hex ; do
>            for y in $hex ; do
>                mkdir ${x}${y}
>            done
>        done
>        exit 0

Or use jot(1) instead of two for loops:

for i in `jot -w %02x 256 0`; do mkdir $i; done

To see the output of the jot in a readable format:

jot -w %02x 256 0 | rs 0 16

Jonathan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906111014.33706.j.mckeown>