SPLIT(1)                                                                    User Commands                                                                   SPLIT(1)
NAME
       split - split a file into pieces
SYNOPSIS
       split [OPTION]... [INPUT [PREFIX]]
DESCRIPTION
       Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; 
default size is 1000 lines, and default PREFIX is `x'.  
With no INPUT, or when INPUT is -, read
       standard input.
       Mandatory arguments to long options are mandatory for short 
options too.
       -a, --suffix-length=N
              use suffixes of length N (default 2)
       -b, --bytes=SIZE
              put SIZE bytes per output file
       -C, --line-bytes=SIZE
              put at most SIZE bytes of lines per output file
       -d, --numeric-suffixes
              use numeric suffixes instead of alphabetic
       -e, --elide-empty-files
              do not generate empty output files with `-n'
       --filter=COMMAND
              write to shell COMMAND; file name is $FILE
       -l, --lines=NUMBER
              put NUMBER lines per output file
       -n, --number=CHUNKS
              generate CHUNKS output files.  See below
       -u, --unbuffered
              immediately copy input to output with `-n r/...'
       --verbose
       --help display this help and exit
       --version
              output version information and exit
       SIZE may be (or may be an integer optionally followed by) 
one of following: KB 1000, K 1024, MB 1000*1000, M 1024*1024, 
and so on for G, T, P, E, Z, Y.
       CHUNKS may be: N       split into N files based on size of
 input K/N     output Kth of N to stdout l/N     
split into N files without splitting  lines  l/K/N
       output Kth of N to stdout without splitting lines r/N     
like `l' but use round robin distribution r/K/N   
likewise but only output Kth of N to stdout
Exemplo #1:
split --bytes=10M /caminhodoarquivo grande/ /caminhoparaoarquivomenor
cat X* > arquivo de destino
Exemplo #2:
split -b 1440k arquivo_grande.gz 
cat xaa xab xac xad > arquivo_grande.gz 
Exemplo #3:
split -b 1M arquivo_a_dividir
cat primeira_parte* > nome_arquivo_final
Exemplo #4:
split -b 500M portal.zexp \#128921/portal.zexp-
$ tree \#128921/
#128921/
├── portal.zexp-aa
└── portal.zexp-ab
cat \#128921/* > portal.zexp
Atualizações
20150725;
Relacionados
fatorar e reagrupar arquivos
 
Comentários