1SPLIT(1) User Commands SPLIT(1)
2
3
4
6 split - split a file into pieces
7
9 split [OPTION]... [FILE [PREFIX]]
10
12 Output pieces of FILE to PREFIXaa, PREFIXab, ...; default size is 1000
13 lines, and default PREFIX is 'x'.
14
15 With no FILE, or when FILE is -, read standard input.
16
17 Mandatory arguments to long options are mandatory for short options
18 too.
19
20 -a, --suffix-length=N
21 generate suffixes of length N (default 2)
22
23 --additional-suffix=SUFFIX
24 append an additional SUFFIX to file names
25
26 -b, --bytes=SIZE
27 put SIZE bytes per output file
28
29 -C, --line-bytes=SIZE
30 put at most SIZE bytes of records per output file
31
32 -d use numeric suffixes starting at 0, not alphabetic
33
34 --numeric-suffixes[=FROM]
35 same as -d, but allow setting the start value
36
37 -x use hex suffixes starting at 0, not alphabetic
38
39 --hex-suffixes[=FROM]
40 same as -x, but allow setting the start value
41
42 -e, --elide-empty-files
43 do not generate empty output files with '-n'
44
45 --filter=COMMAND
46 write to shell COMMAND; file name is $FILE
47
48 -l, --lines=NUMBER
49 put NUMBER lines/records per output file
50
51 -n, --number=CHUNKS
52 generate CHUNKS output files; see explanation below
53
54 -t, --separator=SEP
55 use SEP instead of newline as the record separator; '\0' (zero)
56 specifies the NUL character
57
58 -u, --unbuffered
59 immediately copy input to output with '-n r/...'
60
61 --verbose
62 print a diagnostic just before each output file is opened
63
64 --help display this help and exit
65
66 --version
67 output version information and exit
68
69 The SIZE argument is an integer and optional unit (example: 10K is
70 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,...
71 (powers of 1000).
72
73 CHUNKS may be:
74 N split into N files based on size of input
75
76 K/N output Kth of N to stdout
77
78 l/N split into N files without splitting lines/records
79
80 l/K/N output Kth of N to stdout without splitting lines/records
81
82 r/N like 'l' but use round robin distribution
83
84 r/K/N likewise but only output Kth of N to stdout
85
87 Written by Torbjorn Granlund and Richard M. Stallman.
88
90 GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
91 Report split translation bugs to <https://translationproject.org/team/>
92
94 Copyright © 2018 Free Software Foundation, Inc. License GPLv3+: GNU
95 GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
96 This is free software: you are free to change and redistribute it.
97 There is NO WARRANTY, to the extent permitted by law.
98
100 Full documentation at: <https://www.gnu.org/software/coreutils/split>
101 or available locally via: info '(coreutils) split invocation'
102
103
104
105GNU coreutils 8.30 July 2018 SPLIT(1)