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:
>
> =A0 =A0 =A0 =A0#!/bin/sh
> =A0 =A0 =A0 =A0hex=3D'0 1 2 3 4 5 6 7 8 9 a b c d e f'
> =A0 =A0 =A0 =A0for x in $hex ; do
> =A0 =A0 =A0 =A0 =A0 =A0for y in $hex ; do
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mkdir ${x}${y}
> =A0 =A0 =A0 =A0 =A0 =A0done
> =A0 =A0 =A0 =A0done
> =A0 =A0 =A0 =A0exit 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>