tar. gz是什么文件,有什么用?

如题所述

以·tar.gz为后缀的文件是一种压缩文件,在Linux和macOS下常见,Linux和macOS都可以直接解压使用这种压缩文件。

windows下的WinRAR也可以使用,相当于常见的RAR和ZIP格式。

.tar.gz一般情况下都是源代码的安装包,需要先解压再经过编译、安装.才能执行。总而言之它是一个压缩文件。

解压:[*******]$ tar -zxvf FileName.tar.gz

压缩:[*******]$ tar -zcvf FileName.tar.gz DirName

所谓的 tarball 文件,其实就是将软件的所有原始码档案先以 tar 打包,然后再以压缩技术来压缩,通常最常见的就是以 gzip 来压缩了。因为利用了 tar 与 gzip 的功能,所以 tarball 档案一般的附档名就会写成 .tar.gz 或者是简写为 .tgz

扩展资料

详细安装步骤,步骤后附解释:

[yonghu@localhost ~]# su root

口令:

[root@localhost ~]# cd /home/new/Desktop

[root@localhost Desktop]# tar -xzvf fcitx-3.4.2.tar.gz

[root@localhost Desktop]# cd /home/new/Desktop/fcitx-3.4.2

[root@localhost fcitx-3.4.2]#./configure --prefix=/opt/fictx

[root@localhost fcitx-3.4.2]#make

[root@localhost fcitx-3.4.2]#make install

各步骤详解

[yonghu@localhost ~]#su root //(使用root帐户登录,使用其他用户,之后操作有可能权限不够)

口令: // 输入root密码

[root@localhost ~]# cd /home/new/Desktop

// (切换到tar.gz文件所在目录,这里我的tar.gz文件在桌面)

[root@localhost Desktop]#tar -xzvf fcitx-3.4.2.tar.gz

// (解压tar.gz文件,这里以fcitx-3.4.2来举例,解压得到fcitx-3.4.2文件夹)

[root@localhost Desktop]#cd /home/new/Desktop/fcitx-3.4.2

//(切换目录到fcitx-3.4.2,软件解压的目录)

[root@localhost fcitx-3.4.2]#./configure --prefix=/opt/fictx

//(配置,把文件存放在/opt/fictx下,删除时,卸载软件时,只要删除这个文件就行了)

[root@localhost fcitx-3.4.2]#make (编译)

[root@localhost fcitx-3.4.2]#make install (安装)

温馨提示:答案为网友推荐,仅供参考
相似回答