Find the answer to your Linux question:
Results 1 to 4 of 4
I was trying to split up my vmware image into several files. Supposedly the way to do this was tar cvzpSf * I wrote that in the images folder, and ...
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    Unhappy I compressed everything

    I was trying to split up my vmware image into several files.
    Supposedly the way to do this was

    tar cvzpSf *

    I wrote that in the images folder, and yes, it compressed.

    Thing is, I can't uncompress it. I think it might have something to do with the fact that I didn't define an archive name.
    The largest file was 8 GB, now it's 1 GB. When I untar * it looks like it's uncompressing but when it's finished, nothing has changed.

    I feel like I divided by zero.

    Halp

  2. #2
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    Try this, after cd'ing into the directory
    Code:
    for i in *;do tar -xvf "$i";done
    Post back and let us know how that works out.

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2
    bash-3.2$ for i in *;do tar -xvf "$i";done
    tar: Applications: Cannot read: Is a directory
    tar: At beginning of tape, quitting now
    tar: Error is not recoverable: exiting now
    Windows Server 2003 Standard Edition.vmem
    Windows Server 2003 Standard Edition.vmsd
    Windows Server 2003 Standard Edition.vmss
    Windows Server 2003 Standard Edition.vmx
    Windows Server 2003 Standard Edition.vmxf
    vmware-0.log
    vmware-1.log
    vmware-2.log
    vmware.log
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Error exit delayed from previous errors
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Error exit delayed from previous errors
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Error exit delayed from previous errors
    tar: test: Cannot read: Is a directory
    tar: At beginning of tape, quitting now
    tar: Error is not recoverable: exiting now
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Error exit delayed from previous errors
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Error exit delayed from previous errors
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Error exit delayed from previous errors
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Error exit delayed from previous errors
    bash-3.2$


  4. #4
    Linux Newbie Ziplock's Avatar
    Join Date
    Jan 2009
    Location
    Adelaide
    Posts
    169
    Hi there,

    I think you are right about the name of the archive. Your tar command would have tarred all of the files in the directory into the one file, unfortunately, that file is the first one returned by the '*' wildcard. ie if you have a directory with files 'one', 'two' and 'three' in it and you run

    tar cvzpSf *

    you will probably tar everything into the file called 'one'

    tar xvzf one

    will get you the 'two' and 'three' files back, but 'one' is probably lost for good.

    If you do an 'ls -alh' in the directory, it should show a very large file.

    Good luck.

Posting Permissions

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