TITLES: || HOME | Contact
Us || || Add Command || AliasesBackupcpInsertion of a password into a pdf filePlay video DVD ISO file with XineQuick format of CD-RWRemoving old kernelsSearchingSplitxorg.conf ModeLine
|
Showing SplitScroll Down to see the comments / add comments Submitted by: Will | Total Views: 283 This is a cool command:
Say you have a file named "bu.tar.gz" and the size is 3MB and the size you want them to be is 1M a piece. This is what you do:
Make a directory, it is easier to manage.
[user@computer ~]$ mkdir bu_split
Issue the split command
[user@computer ~]$ split --bytes=1m bu.tar.gz ./bu_split/split
The above will split the bu.tar.gz into 1M files named split
To put the files back together do the following:
Change to the directory
[user@computer ~]$ cd bu_split
Issue the command to put it all together
[user@computer bu_split]$ cat * > bu.tar.gz
That will put it all back together the way it was!
Pretty slick command.
Here is the --help output:
Usage: split [OPTION] [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; 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
-l, --lines=NUMBER put NUMBER lines per output file
--verbose print a diagnostic to standard error just
before each output file is opened
--help display this help and exit
--version output version information and exit
SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg. | Add Comment | Comments
|