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.

  • 1
    Please clarify, modify it in macOS using the command line or Finder? What have you tried? As written, your question is not clearly about Apple hardware or software. Cheers! – bjbk Mar 1 '18 at 19:58
  • @bjbk I have edited the question – Maysam Mar 1 '18 at 20:00
  • However .avi files have a speciofic format so increasing the size might not work. Are you sure that size is the only issue? – Mark Mar 1 '18 at 22:06
  • @Mark no, probably there are some sort of extra data into the files – Maysam Mar 2 '18 at 18:18

An easy way is to open Terminal.app and use the following command:

dd if=/dev/zero bs=1 count=NUMBER >> 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .