Linux Commands / Tips

Welcome Guest Login or Register
Total Members: 5


TITLES:

|| HOME | Contact Us ||
|| Add Command ||

  • Aliases
  • Backup
  • cp
  • Insertion of a password into a pdf file
  • Play video DVD ISO file with Xine
  • Quick format of CD-RW
  • Removing old kernels
  • Searching
  • Split
  • xorg.conf ModeLine
  • Search:

    Showing Split

    Scroll 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

    Name: Comment


    Linux Commands by CodeHeads and Paul Smith © 2006 All Rights Reserved! All information on this site is property of the respected owners (posters)