On Sun, 30 Jan 2000, Ken Yap mashed on the keyboard:
>>As an extension to the shell programming talk at last night's meeting:
>>
>>user@somebox$ for i in `seq -w 1 2147483648`; do touch file$i; done
>>
>>should quickly fill up your inodes :)
>
>Bet you haven't actually tried it because you'll probably hit the limit
>on the number of arguments first. Better use expr in a loop to increment
>a variable. Or better still, write it in C or Perl, shell will take ages.
I don't see where the argument limit will hit.. `for' is a shell
internal, and touch only has one argument. The output from the
backticks is internal due to the nature of `for' (as is my
understanding)
Actually, I've done:
for i in `seq 1 2147483648`; do echo $i; done
and before I hit any (sanity imposed) limit, my system slowed to a crawl
as the swap started thrashing, bash was using over 100M of virtual
memory, and seq was hogging all the CPU. The darn thing died with a
segfault the first time, and the second time complained that malloc
couldn't allocate something in the order of 4G of memory :)
--
jamesw
"A 32 bit extension and graphical shell for a 16 bit patch to an 8 bit
operating system originally coded for a 4 bit microprocessor, written by a
2 bit company that can't stand 1 bit of competition."
"What is Windows 95?"
------------------------------
[EMAIL PROTECTED]
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text