无法通过 Mac 提取 SO 的数据转储文件

发布于 2024-07-25 20:24:35 字数 1169 浏览 3 评论 0原文

我运行以下 Gert 的提取命令数据转储 文件,其格式 .7z 似乎是问题:

extract () {
   if [ -f $1 ] ; then
       case $1 in
           *.tar.bz2)   tar xvjf $1    ;;
           *.tar.gz)    tar xvzf $1    ;;
           *.bz2)       bunzip2 $1     ;;
           *.rar)       unrar x $1       ;;
           *.gz)        gunzip $1      ;;
           *.tar)       tar xvf $1     ;;
           *.tbz2)      tar xvjf $1    ;;
           *.tgz)       tar xvzf $1    ;;
           *.zip)       unzip $1       ;;
           *.Z)         uncompress $1  ;;
           *.7z)        7z x $1        ;;
           *)           echo "don't know how to extract '$1'..." ;;
       esac
   else
       echo "'$1' is not a valid file!"
   fi
 }

我将它运行到转储文件。 我得到

extract so-export-2009-06.7z       
extract:13: command not found: 7z

这表明我没有 7z 来提取文件。 我通过 MacPorts 安装应用程序 p7zip 失败。 它并没有开始充当 7z 解压器。

如何解压缩 SO 的数据转储?

I run the following Gert's extract command to the data dump file which format .7z seems to be a problem:

extract () {
   if [ -f $1 ] ; then
       case $1 in
           *.tar.bz2)   tar xvjf $1    ;;
           *.tar.gz)    tar xvzf $1    ;;
           *.bz2)       bunzip2 $1     ;;
           *.rar)       unrar x $1       ;;
           *.gz)        gunzip $1      ;;
           *.tar)       tar xvf $1     ;;
           *.tbz2)      tar xvjf $1    ;;
           *.tgz)       tar xvzf $1    ;;
           *.zip)       unzip $1       ;;
           *.Z)         uncompress $1  ;;
           *.7z)        7z x $1        ;;
           *)           echo "don't know how to extract '$1'..." ;;
       esac
   else
       echo "'$1' is not a valid file!"
   fi
 }

I run it to the dump file. I get

extract so-export-2009-06.7z       
extract:13: command not found: 7z

This suggested that I do not have 7z to extract files.
I installed the app p7zip by MacPorts unsuccessfully.
It did not start to act as 7z unzipper.

How can you unzip SO's data dump?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉宸 2024-08-01 20:24:35

编辑:

尝试使用 7za 而不是 7z 作为可执行文件名称,因为这似乎是端口安装的名称,

因此将该行更改

*.7z)        7z x $1        ;;

*.7z)        7za x $1        ;;

Edit:

try using 7za instead of 7z as the executable name, as it appears that is what the port installs

so change the line

*.7z)        7z x $1        ;;

to

*.7z)        7za x $1        ;;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文