tar command help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ice
    Confirmed User
    • Nov 2002
    • 26053

    #1

    tar command help

    How would I do this using the tar command. I need to backup a directory or folder on my server using tar and I can't remember the command.

    Say I'm in the folder movies on my server and inside movies I have the folder called one. From movies what would the command be to create a compressed file one.tar for example
    icq 1904905
  • Trafficbrokercom
    Confirmed User
    • Dec 2002
    • 542

    #2
    tar -cf target.tar directory

    Comment

    • Magg
      Confirmed User
      • Feb 2004
      • 4467

      #3
      tar -cf one.tar one


      to extract:

      tar -xf one.tar one

      Comment

      • xenophobic
        Confirmed User
        • Mar 2004
        • 874

        #4
        Originally posted by Magg
        tar -cf one.tar one


        to extract:

        tar -xf one.tar one
        tar is only an archive, to create compressed backups you would need to do
        tar -zcf one.tar.gz one

        to extract
        tar -zxvf one.tar.gz

        Comment

        • juicylinks
          So Fucking Banned
          • Apr 2001
          • 122992

          #5
          rm -r dir

          Comment

          • Ice
            Confirmed User
            • Nov 2002
            • 26053

            #6
            Originally posted by juicylinks
            rm -r dir

            icq 1904905

            Comment

            Working...