Linux下解压文件到其他目录

报错:
[root@node01 software]# tar -xvf openGauss-2.0.1-openEuler-64bit-all.tar.gz /software/opengauss-openeuler/
tar: /software/opengauss-openeuler: Not found in archive
tar: Exiting with failure status due to previous errors

解决方法:
在解压目录前加入参数:-C

[root@node01 software]# tar -xvf openGauss-2.0.1-openEuler-64bit-all.tar.gz -C /software/opengauss-openeuler/
openGauss-2.0.1-openEuler-64bit-om.tar.gz
openGauss-2.0.1-openEuler-64bit.tar.bz2
openGauss-2.0.1-openEuler-64bit-om.sha256
openGauss-2.0.1-openEuler-64bit.sha256
upgrade_sql.tar.gz
upgrade_sql.sha256

  

posted @ 2021-09-30 10:15  orcl  阅读(154)  评论(0编辑  收藏  举报