Splitting of files into many smaller pieces becomes essential in certain situations. Earlier, when memory was limited with devices like floppy disks, it was crucial to split files into smaller file sizes to transfer data in many disks. However, nowadays we split files for other purposes, such as readability, for generating logs, and so on.
Generate a test file (
data.file) of 100kb as follows:
$ dd if=/dev/zero bs=100k count=1 of=data.file
The above command creates a file filled with zeros with the size of 100kb.
You can split files into smaller files by specifying the split size as follows:
$ split -b 10k data.file $ ls data.file xaa xab xac xad xae xaf xag xah xai xaj
It will split
data.file into many files, ...