Results 1 to 6 of 6

Thread: puzzle with tar pgm

  1. #1

    Default puzzle with tar pgm

    Can someone tell me what I am doing wrong. I did what it says in the book.. The file which results, z, is the size I would expect, 2.2 GB.

    I should mention here how right you were when you guessed that the instability of my openSUSE 12.2 was due to my laptop being dirty and overheating. It was cleaned and I got a frame to lift if from the table and to keep it cooler. No more problems with that now. Actually, I went to Linux because my Windows 7 had become unstable. Windows, too, runs nicely now but...........I am not going back to it, I **** SUSE a lot better!

    Thank yoi,
    pe1800

    pe1800@linux-gkd7:~> pwd
    /home/pe1800
    pe1800@linux-gkd7:~> ls -l
    total 44
    drwx------ 2 pe1800 users 4096 Aug 5 12:52 bin
    drwx------ 2 pe1800 users 4096 Jun 3 18:38 Desktop
    drwx------ 9 pe1800 users 4096 Aug 20 18:55 Documents
    drwx------ 2 pe1800 users 4096 Sep 9 11:12 Downloads
    drwx------ 2 pe1800 users 4096 Apr 5 12:48 Music
    drwx------ 12 pe1800 users 4096 Sep 9 21:12 Pictures
    drwx------ 2 pe1800 users 4096 Mar 29 14:11 Public
    drwx------ 2 pe1800 users 4096 Mar 29 14:09 public_html
    drwxr-xr-x 2 pe1800 users 4096 Aug 14 13:36 technotes
    drwx------ 2 pe1800 users 4096 Apr 23 15:52 Templates
    drwx------ 2 pe1800 users 4096 Mar 29 14:11 Videos
    pe1800@linux-gkd7:~> tar -cfz backup-pe1800.tar.gz *
    tar: backup-pe1800.tar.gz: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors

    pe1800@linux-gkd7:~> ls -l
    total 2333660
    drwx------ 2 pe1800 users 4096 Aug 5 12:52 bin
    drwx------ 2 pe1800 users 4096 Jun 3 18:38 Desktop
    drwx------ 9 pe1800 users 4096 Aug 20 18:55 Documents
    drwx------ 2 pe1800 users 4096 Sep 9 11:12 Downloads
    drwx------ 2 pe1800 users 4096 Apr 5 12:48 Music
    drwx------ 12 pe1800 users 4096 Sep 9 21:12 Pictures
    drwx------ 2 pe1800 users 4096 Mar 29 14:11 Public
    drwx------ 2 pe1800 users 4096 Mar 29 14:09 public_html
    drwxr-xr-x 2 pe1800 users 4096 Aug 14 13:36 technotes
    drwx------ 2 pe1800 users 4096 Apr 23 15:52 Templates
    drwx------ 2 pe1800 users 4096 Mar 29 14:11 Videos
    -rw-r--r-- 1 pe1800 users 2389616640 Sep 11 19:23 z
    pe1800@linux-gkd7:~>

  2. #2
    Join Date
    Aug 2008
    Location
    Seattle, WA
    Posts
    1,376

    Default Re: puzzle with tar pgm

    Quote Originally Posted by pe1800 View Post
    pe1800@linux-gkd7:~> tar -cfz backup-pe1800.tar.gz *
    tar: backup-pe1800.tar.gz: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    The -f option should be last, it indicates the name of the archive. Try

    Code:
    tar -czf backup-pe1800.tar.gz *

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,352
    Blog Entries
    3

    Default Re: puzzle with tar pgm

    Quote Originally Posted by pe1800 View Post
    pe1800@linux-gkd7:~> tar -cfz backup-pe1800.tar.gz *
    tar: backup-pe1800.tar.gz: Cannot stat: No such file or directory
    tar: Exiting with failure status due to previous errors
    You told it to tar to the file "z". So it did. It skipped the input file "backup-pe1800.tar.gz" which it could not find.

    For future use, I suggest
    Code:
    tar zcf backup-pe1800.tar.gz
    The file name is what comes after the "f", and in your case that was "z".
    openSUSE Leap 15.1; KDE Plasma 5;

  4. #4

    Default Re: puzzle with tar pgm

    a small bit of advice
    please spell out the words

    i was trying to figure out where the image format "pgm" came into play here
    "Portable Gray Map " -- pgm
    because a tar of a pgm format image , will be a few bits bigger that the image .



  5. #5
    Join Date
    Jun 2008
    Posts
    1,825
    Blog Entries
    1

    Default Re: puzzle with tar pgm

    One thing I noticed is there was no file listed. What you listed were directories. The file, as you stated would be in some directory. backup-pe1800.tar.gz is your file. When you do
    Code:
    ls -al
    if you don't see backup-pe1800.tar.gz, then you are not in the right directory.
    ______________________________________________________________________________________
    Don't ask "if" something can be done, for it can always be done. Rather instead ask "How" can it be done.

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,854

    Default Re: puzzle with tar pgm

    And please use CODE tags around your computer text (like the others above do). It is the # button in the tool bar of the post editor.
    Henk van Velden

Posting Permissions

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