Do you need this file to contain (like random text) or just to occupy disk space ?
Fast network throughput testing; internal system baseline testing. /dev/urandom
Large Files Showcase Demo Code Sample - Apryse documentation
: Most web servers and applications have a maximum file upload size (e.g., 2GB, 1GB, 512MB). A 2GB test file is the definitive way to verify that your server correctly handles files under the limit and gracefully rejects files over it. This includes testing the user interface for proper error messages.