Re: tar cvfz test.tar.gz / gives error while untaring

From: s. keeling (keeling_at_spots.ab.ca)
Date: 02/29/04

  • Next message: Elimar Riesebieter: "Re: gpg & mutt"
    Date: Sun, 29 Feb 2004 13:04:16 -0700
    To: Debian User <debian-user@lists.debian.org>
    
    

    Incoming from Oliver Fuchs:
    >
    > I want to tar my whole / directory.
    >
    > I do
    > tar cvfz test.tar.gz /
    > and afterwards trying to untar the directory I receive the error-message:
    > tar::Cannot mkdir: No such file or directory

    Check the manpage. The "f" switch is used to tell tar that the next
    parameter is the file to use:

       tar cvzf test.tar.gz /

    Instead, cd to someplace with some space, then run it.

    > Typing tar tf test.tar the list shows me:
    >
    > /
    > /boot
    > /root
    > [...]
    >
    > I do not understand why tar is adding the first entry "/" to the archieve
    > and I cannot find a way how to prevent tar from doing this.

    By default, tar doesn't, so you must have done something wrong. Try:

       cd /
       tar cvzf /somewhere/test.tgz .
       cd /somewhere
       tar tvzf test.tgz

    Note the "." btw, tarring the whole root dir will tar the entire
    filesystem, including everything that's mounted off the root
    filesystem. man tar to find out how not to do that.

    -- 
    Any technology distinguishable from magic is insufficiently advanced.
    (*)               http://www.spots.ab.ca/~keeling 
    - -
    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Elimar Riesebieter: "Re: gpg & mutt"

    Relevant Pages

    • Re: XFS: 2.6.26-rc6 link count mismatch for inode
      ... output in dmesg when mounting the filesystem)? ... scsi0: ahci ... Ending clean XFS mount for filesystem: ... The tar xf mozilla-source.tarball was not responding ...
      (Linux-Kernel)
    • Re: Quickest way to bulk copy many files from one disk cluster to another
      ... Copy the whole filesystem with tar while in production, ... Star also implements a -copy flag that allows to avoid pipe related performance ... When one filesystem is NFS mounted, try to make the _source_ filesystem ...
      (comp.unix.solaris)
    • ISO vs .tar
      ... I am experimenting with a new backup strategy based on a DVD-RAM device, ... I opt not to make a zipped archive, because unzipping it off the DVD-RAM ... straight .tar. ... Which type of "filesystem", the .iso ...
      (comp.os.linux.misc)
    • Re: using star to move 3 millions files .. going slowly .. painfully
      ... On a fragmented filesystem, ... not to use logging but to set the "fastfs" flag. ... Sun's tar is much slower than star. ...
      (comp.unix.solaris)
    • Re: dumping a samba directory
      ... prog like tar do you have any recommendations on which type of archiver ... you can give dump the ... but it actually bypasses the normal filesystem ... Samsung printers and HOSTING packages ...
      (freebsd-questions)