Windows下Git Bash的tar命令使用

Administrator@WIN-5B2ST4S1K5H MINGW64 ~/Documents/spark
$ ls
spark-3.5.4-bin-hadoop3.tgz  spark-3.5.4-bin-without-hadoop.tgz
Administrator@WIN-5B2ST4S1K5H MINGW64 ~/Documents/spark
$ tar -x spark-3.5.4-bin-hadoop3.tgz ./
tar: Refusing to read archive contents from terminal (missing -f option?)
tar: Error is not recoverable: exiting now
Administrator@WIN-5B2ST4S1K5H MINGW64 ~/Documents/spark
$ tar -xf spark-3.5.4-bin-hadoop3.tgz ./
tar: .: Not found in archive
tar: Exiting with failure status due to previous errors
Administrator@WIN-5B2ST4S1K5H MINGW64 ~/Documents/spark
$ tar -xf spark-3.5.4-bin-hadoop3.tgz
Administrator@WIN-5B2ST4S1K5H MINGW64 ~/Documents/spark
$ ls
spark-3.5.4-bin-hadoop3/     spark-3.5.4-bin-without-hadoop.tgz
spark-3.5.4-bin-hadoop3.tgz
posted @ 2025-01-14 18:17  基础狗  阅读(31)  评论(0)    收藏  举报