Linux Rename

useful linux command rename

Terminal

Rename!

there’s a really cool terminal command called “split” if you have to break up a large CSV file, such as something like a million rows, into separate files with 100k rows in each, you can just run something like
split thefile.csv -d –lines=”100000″
-d uses a numeric file increment instead of letters
from what I can tell this method will remove the file extension but you can use another terminal command called “rename” something like this should do it
rename ‘s/&/.csv’ the file* .

Useful links:

  • http://man7.org/linux/man-pages/man1/rename.1.html
  • https://linux.die.net/man/1/split

Author: zach2825

Developer Extraordinaire

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.