Grab a random number of bytes from a file with bash?

Posted by GeoffreyF67 on Stack Overflow See other posts from Stack Overflow or by GeoffreyF67
Published on 2010-05-24T16:31:20Z Indexed on 2010/05/24 16:41 UTC
Read the original article Hit count: 308

Filed under:
|
|
|

I have a file of 256MB. I'd like to retrieve a random amount of data from this file and copy it to another file.

Is there a way to do this in bash or some other way?

G-Man

Edit: choose a random number between 1 and 256 then copy that number of mb from one file to another.

© Stack Overflow or respective owner

Related posts about linux

Related posts about bash