May 5, 2021

Split a large .CSV-file in Mac OS X Terminal

If the CSV file sizes are very big and it may take more time for processing. We may need convert into multiple chunk files. To do this, we can follow below commands in Mac OS X terminal.

  • Split into chunks of 500mb each
split -b 500m split_me.csv
  • Next, add the .csv extension to all of them
for i in *; do mv "$i" "$i.csv"; done

Software Architect & Web Developer
CONTACT
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram