Is it possible to use
gzip to decompress a gzipped file, without the gz extension, and without moving the file?
You can pass the
If you want the uncompressed file to have some other name, run
(these commands are equivalent).
Normally unzipping restores the name and date of the original file (when it was compressed); this doesn't happen with
If you want the compressed file and the uncompressed file to have the same name, you can't do it directly, you need to either rename the compressed file or rename the uncompressed file. In particular,
You can, do something like:
Now you can't do that and uncompress to the same filename. You'll need to rename the uncompressed file afterwards (i.e. you can't in-place uncompress that way).