{"id":413,"date":"2013-06-27T12:57:15","date_gmt":"2013-06-27T12:57:15","guid":{"rendered":"https:\/\/shan.info\/new\/sort-very-large-file\/"},"modified":"2013-06-27T12:57:15","modified_gmt":"2013-06-27T12:57:15","slug":"sort-very-large-file","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/sort-very-large-file\/","title":{"rendered":"sort very large file"},"content":{"rendered":"<pre class=\"brush:bash\">LC_ALL=C sort -u --buffer-size=2G --temporary-directory=\/root\/Desktop\/tmp --output=joined_sorted.txt joined.txt \r\nuniq joined_sorted.txt joined_sorted_uniqed.txt\r\nsplit bigFileName -l \u6309\u884c\u5206\u5272\r\nwc -l joined.txt \r\nsplit -l 10000000 joined.txt joined_split_\r\nfor f in joined_split_*; do\r\n  sort -u \"$f\" &gt; \"$f\"_sorted\r\ndone\r\nsort -u -m joined_split_*_sorted &gt; final.out\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>LC_ALL=C sort -u &#8211;buffer-size=2G &#8211;temporary-directory=\/root\/Desktop\/tmp &#8211;output=joined_sorted.txt joined.txt uniq joined_sorted.txt joined_sorted_uniqed.txt split bigFileName -l \u6309\u884c\u5206\u5272 wc -l joined.txt split -l 10000000 joined.txt joined_split_ for f in joined_split_*; do sort -u &#8220;$f&#8221; &gt; &#8220;$f&#8221;_sorted done sort -u -m joined_split_*_sorted &gt; final.out<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-413","post","type-post","status-publish","format-standard","hentry","category-centos-6"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=413"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/413\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}