DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: UNIX help - using tar and gzip in one command

  1. #1
    Join Date
    Jun 2001
    Location
    NY
    Posts
    226
    Members

    Can someone give me the syntax of how to use the tar command on a bunch of files in the current directory and then pipe it to the gzip command. I have tried the following and it doesn't work:

    tar -cvf rman_hot.tar . | gzip > rman_hot.tar.gz

    Thanks a lot in advance,
    roukie-dba

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    tar cvf - test*.log | gzip >test_tar.Z

  3. #3
    Join Date
    Jun 2001
    Location
    NY
    Posts
    226
    Thanks T. for the quick response. One question though, what does the dash '-' after cvf means?

    Thanks again!
    roukie-dba

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    it means to send the tarball to stdout instead of a file...
    Jeff Hunter

Posting Permissions

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


Click Here to Expand Forum to Full Width