[Gloucs] USB flash drive testing tools

Andy Teague andy.teague at ukonline.co.uk
Wed Jun 23 15:22:35 UTC 2010


On 23/06/10 00:11, Graham Nye wrote:
> Glyn Davies wrote:
>    
>> I'm aware of /dev/random and /dev/urandom...
>>      
> I looked at those before using /dev/zero.
> /dev/urandom is much slower than /dev/zero. (That might be
> an advantage if you want to see if your device writing
> problems are speed related.)
>
> /dev/random is set up to produce small amounts of relatively
> high quality randomness. It will just block if you try
> copying it to a USB drive.
>
> (So what does high quality randomness mean? See:
> http://www.eworldui.net/blog/post/2004/10/25/Dilbert-on-Random-Number-Generation.aspx )
>
>    
>> ...but why isn't there a /dev/one?
>>      
> A common request on Google. For those with kernel hacking skills
> there's a patch at
> http://www.linuxquestions.org/questions/linux-newbie-8/is-there-a-dev-one-like-dev-zero-619626/
>
> A more general solution would be a /dev/word you could program with an ioctl
> to generate an arbitrary bit stream. Anyone fancy a challenge?
>    
depending on what you want to do:
cat /dev/zero | tr "\0" <any character> | <an app needing input>
will generate a constant stream of any one character
(eg  y,Y,1 n,N,0 ...)

you could probably create a named pipe/fifo and feed that if the app 
wouldn't take standard input


Andy




More information about the gloucs mailing list