Sample Header Ad - 728x90

Write all numbers between 0 and large number (both inclusive) to a file in random order

0 votes
1 answer
121 views
For simulation I am trying to do, I want a text file with numbers ranging from 0 to 2^33 which is a huge number. I have used this command:
seq 0 Number >> OUTPUT FILE
But this is very slow. The file is nearly 94 GB, so we can't use shuf.Then I have used [terashuf](https://github.com/alexandres/terashuf) by Alexandres which is also taking quite a lot of time. Even though I have done what I wanted to do, I wanted to know if there is a faster way to do this in a single command and whether there is any way in which we can truly randomize the order of these numbers **NOTE:** Even though I have been using Linux from quite a log time, I have very limited knowledge on bash scripting. So please try to give answers which a beginner can understand.
Asked by Uday (101 rep)
May 2, 2020, 01:26 PM
Last activity: May 2, 2020, 01:48 PM