How to create a file with a specified memory size in Python
In this guide, we talk about How to create a file with a specified memory size in Python. python create a file of a particular size, just seek to the byte number(size). python creation of a file with dummy data for given specified memory size.
Example
import os
cmd = ("dd if=/dev/zero of=filename.txt bs=1 count=0 seek=2G")
os.system(cmd)