0

I have extracted a file 'linux' from ubutu installation .iso file. The command file linux gives me this output.

linux: gzip compressed data, was "vmlinuz-5.4.0-42-generic.efi.signed", last modified: Sat Jul 11 08:53:21 2020, max compression, from Unix, original size modulo 2^32 30118272

To uncompress it, I tried gzip -d linux but it gives me gzip: linux: unknown suffix -- ignored as output. How can I extract or uncompress this file?

1 Answer 1

1

gunzip (or gzip -d) tries to infer the output filename by removing the "dot suffix" from the input file name. Since filename linux doesn't have a suffix, if doesn't know what to name the output.

If your version of gzip supports the -N option you can try using that to restore the extracted file's original name:

   -N --name
          When  compressing,  always  save the original file name and time
          stamp; this is the  default.  When  decompressing,  restore  the
          original  file  name  and  time stamp if present. This option is
          useful on systems which have a limit on file name length or when
          the time stamp has been lost after a file transfer.

Otherwise probably the simplest thing is to rename the input file (to linux.gz for example). Alternatively, decompress to standard output and redirect to a filename of your choosing: gzip -dc linux > vmlinuz-5.4.0-42-generic.efi.signed

1
  • Thanks! (I feel like I was a headless dude back then :) )
    – Chan Kim
    Commented Jul 28, 2021 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .