dd if=/dev/urandom of=<destination> bs=1048576 count=<filesize>
Example
This will generate a random file with 1000MB
export function generateUUID(): string { | |
let dt = Date.now() | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { | |
const r = Math.trunc((dt + Math.random() * 16) % 16) | |
dt = Math.floor(dt / 16) | |
// eslint-disable-next-line no-bitwise | |
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16) | |
}) | |
} |