Linux 如何将文件_name.csv.gz文件解压缩到.csv

Linux 如何将文件_name.csv.gz文件解压缩到.csv,linux,bash,shell,unix,Linux,Bash,Shell,Unix,我想将*.csv.gz格式的文件解压缩为.csv格式 当我尝试使用这些命令$gzip-d file.gz和$gzip-f file.gz时,它显示如下 gzip: IQ.gz: No such file or directory gzip: Envoy.gz: No such file or directory gzip: compressed data not read from a terminal. Use -f to force decompression. For help, type

我想将*.csv.gz格式的文件解压缩为.csv格式

当我尝试使用这些命令
$gzip-d file.gz
$gzip-f file.gz
时,它显示如下

gzip: IQ.gz: No such file or directory
gzip: Envoy.gz: No such file or directory
gzip: compressed data not read from a terminal. Use -f to force decompression.
For help, type: gzip -h
请帮我在这个问题上如何解压

提前谢谢

find . -name '*.csv.gz' -print0 | xargs -0 -n1 gzip -d
您也可以选择:

find . -name '*.csv.gz' -exec gzip -d {} \;

也会起作用。这些是递归的,因此它们将进入子目录。

我不是该领域的专家,但看到您的错误,我会说您运行命令的地方没有文件名IQ.gz或ENVISOTE.gz……不,文件在那里。当我尝试使用-f选项时,它不会解压,也不会占用太多时间。您的文件名中是否有空格(例如“IQ emission.gz”)?如果尝试gzip-d hello world.gz,gzip将搜索文件“hello(.gz)”和“world.gz”。试试gzip-d“helloworld.gz”。