Results 1 to 4 of 4

Thread: how create .bz2 file?

  1. #1

    Default how create .bz2 file?

    Is there a built in command for openSUSE to create a ".tar.bz2" file? I know how to tar, but don't know what to use to create a bz2 file.

  2. #2

    Default Re: how create .bz2 file?

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    'man tar'

    -j, --bzip2
    filter the archive through bzip2

    You can also use the bzip2 command for an existing tar, though doing both
    at once is usually nicer. To create:

    tar -cjvf /path/to/your/file.tbz /path/to/files/going/into/the/tar

    to extract:

    tar -jxvf /path/to/your/file.tbz

    Good luck.





    6tr6tr wrote:
    > Is there a built in command for openSUSE to create a ".tar.bz2" file? I
    > know how to tar, but don't know what to use to create a bz2 file.
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJKnakqAAoJEF+XTK08PnB5FD4P/jWDn9cjuldyj6HD0Gy6NSqn
    DAQmjnkQ5xwMZ03j3+C+zuU0dWJCGdnurACYgtMYDv1wXUnkv6n9f97I+k4DPtxa
    TOh0J2ajIaiQ3XYbRZZaCWTzNqu6V9dwpT+U+mL2cxae/6ll5+F9fpW2JxuJJzYK
    o9TOQwlHYVzMunyQjvM1B92NS22h1gbt23He80cmoL4YDhyjiTrelWDsh+34aKv/
    gpZm71j67awsMirXR8m2BK2HPXHSrd3SBJmUIF45wTyW6Vy3l3FIb7HE7JX4m/ZT
    uSVKTgRTch55iT0zPUyNWeOZXJ5Kw/igLXHKaBpVG1JR8A1osNRl3VXNgI7qGtBE
    n7Uw4hEI/sRPM0GAS94ryCg4AGI9WMFlqcYYbB8rMAGx8wcMraijOqrgSP1Uhncn
    /5woanh4LZ/StHu9H3t3L3MU954K1dSXkT7yGkqVY4ZrIR5We1yi50Z6Ljinbjg2
    pFoQkwpro+2aVAreK2m8yIaRAiDq1m9wfrQlxqJgajZuHs+Hsi3NBK8zx/q43LNw
    OWjgtfGsDM7eJup289inoDW6ZyhzewbVZxMvXaDHaPiQor2I4eABzytW5ggmRQbJ
    nm+Gd8na170fTOuajjpxb5ptnjCr+ZqMYMLtJ1EIwauUgtzJBzVUujvg5HL6EZiT
    uABlJvKfdRc3zgEZsk4D
    =VIQL
    -----END PGP SIGNATURE-----

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,650
    Blog Entries
    15

    Default Re: how create .bz2 file?

    Quote Originally Posted by 6tr6tr
    Is there a built in command for openSUSE to create a ".tar.bz2" file? I
    know how to tar, but don't know what to use to create a bz2 file.
    Hi
    In gnome just select files/folders and create archive. From the command
    line tar/gzip then bznew the tar.gz file.For example to produce
    scripts.tar.bz2
    Code:
    tar -czf scripts.tar.gz scripts/* && bznew scripts.tar.gz
    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
    up 4 days 20:20, 2 users, load average: 0.31, 0.12, 0.12
    GPU GeForce 8600 GTS Silent - Driver Version: 190.18


  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: how create .bz2 file?

    .bz2 files are created with bzip2. As ab and malcolmlewis have explained you can create them in one step with tar, so I'll just show you what that one step effectively breaks down to:

    Code:
    tar cf archive.tar files-and-directories-to-archive
    bzip2 archive.tar
    You can use bzip2 to compress other things, not just tar files, e.g. mysql dumps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •