<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Gustavo Picoloto &#187; split</title> <atom:link href="http://www.picoloto.com.br/tag/split/feed" rel="self" type="application/rss+xml" /><link>http://www.picoloto.com.br</link> <description>Dicas e "notícias" sobre Linux, Segurança e etc ...</description> <lastBuildDate>Wed, 14 Dec 2011 17:48:40 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>Dica sobre o comando split</title><link>http://www.picoloto.com.br/linux/dica-sobre-o-comando-split.php</link> <comments>http://www.picoloto.com.br/linux/dica-sobre-o-comando-split.php#comments</comments> <pubDate>Wed, 25 Mar 2009 00:19:35 +0000</pubDate> <dc:creator>Gustavo</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[shell script]]></category> <category><![CDATA[split]]></category><guid
isPermaLink="false">http://www.picoloto.com.br/?p=188</guid> <description><![CDATA[Hoje um colega do trampo me perguntou se tem algum comando rápido e fácil, em unix, pra dividir um arquivo em vários. Como sei que esta pode ser uma dúvida para mais pessoas, resolvi publicar este mini artigo com o resumo da conversa. Pergunta: tem algum comando rápido e fácil de unix pra dividir um [...]]]></description> <content:encoded><![CDATA[<p>Hoje um colega do trampo me perguntou se tem algum comando rápido e fácil, em unix, pra dividir um arquivo em vários.</p><p>Como sei que esta pode ser uma dúvida para mais pessoas, resolvi publicar este mini artigo com o resumo da conversa.<span
id="more-188"></span></p><p><strong>Pergunta</strong>: tem algum comando rápido e fácil de unix pra dividir um arquivo em vários?<br
/> <strong>Resposta</strong>: split<br
/> <strong>Resposta</strong>: split -b 100M arquivo_origem destino<br
/> <strong>Resposta</strong>: vai quebrar o arquivo_origem em arquivos de 100 mbytes e o prefixo do nome será &#8220;destino&#8221;<br
/> <strong>Pergunta</strong>: tem como ser pela quantidade de linhas?<br
/> <strong>Resposta</strong>: split -l 100 arquivo_origem destino<br
/> <strong>Resposta</strong>: vai quebrar em arquivos de 100 linhas</p><p>Acho que pelo resumo do diálogo já é possível que se tenha uma ideia básica do funcionamento do comando split. Caso tenha mais dúvidas, consulte o help:</p><blockquote><pre>$ split --help</pre><pre>Usage: split [OPTION] [INPUT [PREFIX]]</pre><pre>Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default</pre><pre>size is 1000 lines, and default PREFIX is `x'.  With no INPUT, or when INPUT</pre><pre>is -, read standard input.</pre><pre>Mandatory arguments to long options are mandatory for short options too.</pre><pre>-a, --suffix-length=N   use suffixes of length N (default 2)</pre><pre>-b, --bytes=SIZE        put SIZE bytes per output file</pre><pre>-C, --line-bytes=SIZE   put at most SIZE bytes of lines per output file</pre><pre>-d, --numeric-suffixes  use numeric suffixes instead of alphabetic</pre><pre>-l, --lines=NUMBER      put NUMBER lines per output file</pre><pre>--verbose           print a diagnostic to standard error just</pre><pre>before each output file is opened</pre><pre>--help     display this help and exit</pre><pre>--version  output version information and exit</pre><pre>SIZE may have a multiplier suffix:</pre><pre>b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,</pre><pre>GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.</pre></blockquote>]]></content:encoded> <wfw:commentRss>http://www.picoloto.com.br/linux/dica-sobre-o-comando-split.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/9 queries in 0.004 seconds using disk: basic
Object Caching 187/197 objects using disk: basic

Served from: www.picoloto.com.br @ 2012-02-06 16:22:49 -->
