unix – split large text file into smaller one

run:

split -a 5 -d -l 10000 my_file.txt my_file_

usage:

split -a 5 -d -l <nb_lines_per_file> <file_to_split> <split_prefix>
  • d = numeric numbering (instead of alphabetical)
  • l = number of lines per split files
  • a = number of characters used for numbering (increase it in case of exhaustion)

sources

Post a Comment

Your email is never published nor shared. You're allow to say what you want...


Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/remydamo/websites/qc4blog/www/wp-content/plugins/sweetcaptcha-revolutionary-free-captcha-service/library/sweetcaptcha.php on line 81

Warning: fsockopen() [function.fsockopen]: unable to connect to www.sweetcaptcha.com:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/remydamo/websites/qc4blog/www/wp-content/plugins/sweetcaptcha-revolutionary-free-captcha-service/library/sweetcaptcha.php on line 81