prima di attivare il comando:
dd if=/dev/urandom of=file.txt bs=2048 count=10
creerà un file sul percorso di dimensione bs * numero di byte casuali, nel nostro caso 2048 * 10 = 20Kb. che può essere modificato come da requisito.
cat - > file.txt
Questo comando reindirizza STDIN a un file, quindi dovrai inserire due righe e poi premere Ctrl + D. Quindi dovrai eseguire il seguente comando:
for i in {1..n}; do cat file.txt file.txt > file2.txt && mv file2.txt file.txt; done
Dove n è un numero intero. Questo creerà un file con 2 ^ (n + 1) linee, duplicando le due linee originali. Quindi, per creare un file con 16 righe, dovresti fare:
for i in {1..3}; do cat file.txt file.txt > file2.txt && mv file2.txt file.txt; done
Ecco alcuni altri numeri per iniziare:
n=15 will give you 65536 lines (if the original two lines were 'hello' and 'world' the file will be 384Kb)
n=20 will give you 2097152 lines (12Mb file with 'hello' and 'world' as the two starting lines)
n=25 will give you 67108864 lines (384Mb file with 'hello' and 'world' as the two starting lines)