How can I pad a file to make it a specific size? Is it possible to modify file size attribute in Terminal? seems my dash cam only recognizes video files with the exact size of 419,430,400 bytes. My video file is much smaller than this, but in order to play it on dashcam I have to make it match this number! 

I have tried this: 

xattr -w kMDItemFSSize "419430400" LOCA0122.avi 


but didn't work.
An easy way is to open Terminal.app and use the following command:

dd if=/dev/zero bs=1 count=NUMBER &gt;&gt; yourfile


Here "yourfile" should be changed to the name of your file, including the full path to the file. "NUMBER" should be changed to the number of bytes, you want to add to the file.

So if you need the exact size to be 419,430,400 bytes and your file is 110,000,000 bytes, you would replace NUMBER with 309430400.