Find the answer to your Linux question:
Results 1 to 4 of 4
Code: # tar cf file.tar file # gz -9 file.tar that's the command when compressing file to tar.gz format but it CAN NOT archieving file with password, not like when ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Posts
    1

    tar.gz file with password


    Code:
    # tar cf file.tar file
    # gz -9 file.tar
    that's the command when compressing file to tar.gz format but it CAN NOT archieving file with password, not like when i used winzip or winrar in windows os. so, how to compressing file to tar.gz format but with password.

    and how to do it in tar.bz2 format (compressing file to tar.bz2 with password) ?

    thank for the help

  2. #2
    Linux Engineer
    Join Date
    Aug 2004
    Posts
    826
    gz isn't a command on my computer, though it might be on yours. To gzip a file do
    Code:
    $ gzip file.tar
    and to bzip2 it do
    Code:
    $ bzip2 file.tar
    There shouldn't be a password required to compress a file.

  3. #3
    Just Joined!
    Join Date
    Feb 2005
    Location
    Noplace Interesting
    Posts
    76
    It seems like you're trying to encrypt the archive with a password. Try-
    gpg -c <file_name>
    gpg should ask you for a passphrase (aka password).
    To decrypt->
    gpg <file_name>.gpg
    Again gpg, will ask you for a passphrase to decrypt the file.
    Oh, and to make .bz2 files try
    tar -cjvf <output_file> <input_file>

  4. #4
    Linux Engineer
    Join Date
    Aug 2004
    Posts
    826
    Oh, oops, I forgot about the password thing.

    /me runs and hides

Posting Permissions

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