{"id":203,"date":"2020-03-26T05:57:00","date_gmt":"2020-03-26T05:57:00","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=203"},"modified":"2020-12-05T05:59:35","modified_gmt":"2020-12-05T05:59:35","slug":"linux-split-command","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/linux-split-command\/","title":{"rendered":"Linux split command"},"content":{"rendered":"\n<p>In Linux you can use split and join commands to split large files into smaller files or join many smaller files into a large file. This kind of operations are often necessary when you are dealing with large quantities of data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">split<\/h3>\n\n\n\n<p>Following is the default functionality of split. It splits a large file every thousand lines and creates new files.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ split largefile.txt\n\n$ ls\nlargefile.txt  xaa xab  xac  xad\n\n$ wc -l *\n3285  largefile.txt\n1000  xaa\n1000  xab\n1000  xac<\/code><\/pre>\n\n\n\n<p>You can also define the number of lines you want in each file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ split -l 2000 largefile.txt\n\n$ ls\nlargefile.txt  xaa xab\n\n$ wc -l *\n3285  largefile.txt\n2000  xaa\n2000  xab\n2000  xac<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In Linux you can use split and join commands to split large files into smaller files or join many smaller files into a large file. This kind of operations are often necessary when you are dealing with large quantities of data. split Following is the default functionality of split. It splits a large file every [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[35,88],"class_list":["post-203","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-split"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=203"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/203\/revisions"}],"predecessor-version":[{"id":204,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/203\/revisions\/204"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}