{"id":675,"date":"2018-03-08T15:24:42","date_gmt":"2018-03-08T07:24:42","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=675"},"modified":"2018-03-08T15:24:42","modified_gmt":"2018-03-08T07:24:42","slug":"centos-%e4%b8%ad%e7%94%a8-split-%e5%91%bd%e4%bb%a4%e5%88%86%e5%89%b2%e6%96%87%e4%bb%b6%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=675","title":{"rendered":"CentOS \u4e2d\u7528 Split \u547d\u4ee4\u5206\u5272\u6587\u4ef6\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>CentOS\u00a0\u91cc\u5207\u5272\u5927\u6587\u4ef6\u7684\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n<p>NAME<br \/>\nsplit &#8211; split a file into pieces<br \/>\nSYNOPSIS<br \/>\nsplit [OPTION]&#8230; [INPUT [PREFIX]]<br \/>\nDESCRIPTION<br \/>\nOutput \u00a0fixed-size pieces of INPUT to PREFIXaa, PREFIXab, &#8230;; default size is 1000 lines, and default PREFIX is &#8216;x&#8217;. \u00a0With no INPUT, or when INPUT is -, read standard input.<br \/>\nMandatory arguments to long options are mandatory for short options too.<br \/>\n-a, &#8211;suffix-length=N<br \/>\ngenerate suffixes of length N (default 2)<br \/>\n&#8211;additional-suffix=SUFFIX<br \/>\nappend an additional SUFFIX to file names<br \/>\n-b, &#8211;bytes=SIZE<br \/>\nput SIZE bytes per output file<br \/>\n-C, &#8211;line-bytes=SIZE<br \/>\nput at most SIZE bytes of lines per output file<br \/>\n-d, &#8211;numeric-suffixes[=FROM]<br \/>\nuse numeric suffixes instead of alphabetic; FROM changes the start value (default 0)<br \/>\n-e, &#8211;elide-empty-files<br \/>\ndo not generate empty output files with &#8216;-n&#8217;<br \/>\n&#8211;filter=COMMAND<br \/>\nwrite to shell COMMAND; file name is $FILE<br \/>\n-l, &#8211;lines=NUMBER<br \/>\nput NUMBER lines per output file<br \/>\n-n, &#8211;number=CHUNKS<br \/>\ngenerate CHUNKS output files; see explanation below<br \/>\n-u, &#8211;unbuffered<br \/>\nimmediately copy input to output with &#8216;-n r\/&#8230;&#8217;<br \/>\n&#8211;verbose<br \/>\nprint a diagnostic just before each output file is opened<br \/>\n&#8211;help display this help and exit<br \/>\n&#8211;version<br \/>\noutput version information and exit<\/p>\n<p>\u5e38\u7528\u9009\u9879\u8bf4\u660e\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>-a :\u00a0\u6307\u5b9a\u540e\u7f00\u957f\u5ea6<\/li>\n<li>-b\u00a0:\u00a0\u6bcf\u4e2a\u6587\u4ef6\u591a\u5c11\u5b57\u8282<\/li>\n<li>-d\u00a0:\u00a0\u4f7f\u7528\u6570\u5b57\u540e\u7f00\u800c\u4e0d\u662f\u5b57\u6bcd<\/li>\n<li>-l\u00a0:\u00a0\u6307\u5b9a\u6bcf\u4e2a\u6587\u4ef6\u7684\u884c\u6570<\/li>\n<\/ul>\n<p>\u6bd4\u5982\u6211\u60f3\u8ba9\u540e\u7f00\u957f\u5ea6\u4e3a 2\uff0c\u5373 -a 2\u3002\u7528\u6570\u5b57\u540e\u7f00 -d\u3002\u6bcf\u4e2a\u6587\u4ef6 10M\uff0c\u5373 -b 10m\u3002\u547d\u4ee4\u53ef\u4ee5\u8bbe\u8ba1\u5982\u4e0b\uff1a<\/p>\n<pre><\/pre>\n<ol class=\"dp-xml\">\n<li class=\"alt\">split\u00a0-a\u00a02\u00a0-d\u00a0-b\u00a010m\u00a0\/var\/lib\/mysql\/general.log\u00a0nowamagic<\/li>\n<\/ol>\n<p>\u4f1a\u5728 \/root \u6587\u4ef6\u5939\u4e0b\u751f\u6210\u4e0b\u9762\u7684\u5207\u5272\u6587\u4ef6\uff1a<\/p>\n<pre><\/pre>\n<ol class=\"dp-xml\">\n<li class=\"alt\">nowamagic00<\/li>\n<li>nowamagic01<\/li>\n<li class=\"alt\">nowamagic02<\/li>\n<li>nowamagic03<\/li>\n<li class=\"alt\">nowamagic04<\/li>\n<li>nowamagic05<\/li>\n<li class=\"alt\">nowamagic06<\/li>\n<li>nowamagic07<\/li>\n<li class=\"alt\">nowamagic08<\/li>\n<li>nowamagic09<\/li>\n<\/ol>\n<p>\u9664\u4e86\u6700\u540e\u4e00\u4e2a\u6587\u4ef6\u4e0d\u662f10M\uff08\u6709\u53ef\u80fd\u6070\u597d10M\uff0c\u4e0d\u8fc7\u51e0\u7387\u5f88\u5c0f\uff09\uff0c\u5176\u5b83\u90fd\u662f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS\u00a0\u91cc\u5207\u5272\u5927\u6587\u4ef6\u7684\u547d\u4ee4\u5982\u4e0b\uff1a NAME split &#8211; split a file into pieces SYNOPSIS split [OPTION]&#8230; [INPUT [PREFIX]] DESCRIPTION Output \u00a0fixed-size pieces of INPUT [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-675","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=675"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/675\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}