个人工具
登录
查看“UbuntuHelp:FileCompression”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:FileCompression”的源代码
来自Ubuntu中文
←
UbuntuHelp:FileCompression
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/FileCompression}} {{Languages|UbuntuHelp:FileCompression}} Parent: AccessoriesApplications Files can be compressed in a variety of formats. Some of these can be opened by Ubuntu automatically. Others can be handled if you install extra packages. === Basic Archives === [[Anchor(basic)]] Many archives ( [[tar .tar]],[[targz .tar.gz]],[[zip .zip]] ) Can easily be opened simply by using Archive Manager. To open these formats, click on them with the right mouse button, and choose "Extract here". like this: <br> https://help.ubuntu.com/community/FileCompression?action=AttachFile&do=get&target=extracthere.jpg Double-clicking on them will open the Archive Manager for other tasks.<br> https://help.ubuntu.com/community/FileCompression?action=AttachFile&do=get&target=archivemanager.jpg === Non-archive formats === These formats are not technically archives, but can be opened by Archive Manager: ==== Deb installer packages (.deb) ==== These are actually programs that need to be installed. If you are using Ubuntu 6.06 Dapper Drake or higher you can double-click .deb files to install them. If not, open a terminal, go to the directory the .deb file is in by typing <code><nowiki>cd "DIRECTORYNAME"</nowiki></code>, and type <code><nowiki>sudo dpkg -i DEBNAME.deb</nowiki></code>. '''Warning: Installing programs from .debs can seriously damage your system.''' ==== CD Images (.iso) ==== These are images to be burned on to a cd. See [[UbuntuHelp:BurningIsoHowto]] ==== Java Archives (.jar) ==== These are java programs. See [[UbuntuHelp:Java]] ==== Firefox extensions (.xpi) ==== These are actually extensions for Mozilla Firefox. To install them, launch Firefox and choose Open File from the File menu. Choose the .xpi file and click ok. Firefox will then install the extension. '''Warning: Installing certain extensions may damage your Firefox profile''' === Archive formats === ==== 7zip (.7z) ==== 7zip is a new type of free archive format. Install the package <code><nowiki>p7zip</nowiki></code> from the Universe repository (AddingRepositoriesHowto). To open these files in [[basic Archive Manager]] You need to tell Ubuntu how to deal with these files. Right-click on them and choose Properties. The 4th tab is Open With. Click on it and choose the Add button. Select the program <code><nowiki>Archive Manager</nowiki></code>. <br> https://help.ubuntu.com/community/FileCompression?action=AttachFile&do=get&target=openwith.jpg After this, you can use these files normally from [[basic Archive manager]] ==== Ace (.ace) ==== ACE archives are relatively uncommon and are extracted using the 'unace' utility To add support for it, install <code><nowiki>unace</nowiki></code> from the universe repository (AddingRepositoriesHowto). This cannot be used from [[basic Archive Manager]] so must be used on the command line. To extract .ace files, run the following command: <pre><nowiki> unace x file.ace </nowiki></pre> If you encounter problems (like file compressed with unknown method), the file you are trying to decompress is too new for version of unace in repositories. Go to [http://www.winace.com their Download center] and grab their Unace for linux. Inside the archive you will find newer version of unace (no compiling needed) which can be safely used instead the version from repositories. To install this file run the command: <pre><nowiki> sudo mv /location/of/downloaded/unace /usr/local/bin/unace </nowiki></pre> ==== Rar (.rar) ==== Rar is a non-free archive format created by Rarsoft. There are several versions of rar and the newest version, 3.0, is not supported by any free tools. To add support for it, install the <code><nowiki>unrar</nowiki></code> package from the multiverse repository (AddingRepositoriesHowto). ===== Multi-volume .rar archives ===== To extract the contents of a multi-volume .rar archive, extract the first file in the archive. Usually, the extension will be .rar, .r00, or .r01 (look for one of these in this order). [[Anchor(tar)]] ==== GNU Tar (.tar) ==== The tar archive is an old archive format made for tapes which consist of files added to a single file, one after the other. These files can be extracted using the [[basic Archive Manager]] ==== GNU Tar GZ (.tar.gz .tgz) ==== This archive is a [[tar tar]] archive, which has then been zipped using 'gzip' which is an open source zip utility. These files can be extracted using [[basic Archive Manager]] [[Anchor(tarbz2)]] ==== GNU Tar bzip2 (.tar.bz2) ==== This archive is a [[tar tar]] archive, which has then been zipped using 'bzip2' which is an open source zip utility which results in smaller file sizes than [[targz gzip]] however uses more processing power. These files can be extracted using the [[basic Archive Manager]] [[Anchor(zip)]] ==== Zip (.zip) ==== This is an older archive (and compression) format that originates with PKZip developed by Phil Katz in 1989. It has been in use with DOS and windows for many years. These files can be extracted using the [[basic Archive Manager]] === Command Line Usage === Many of these utilities can be used on the command line, sometimes this is quicker or easier than using the [[basic Archive Manager]] ==== Extracting a tar.bz2 file ==== <pre><nowiki> tar jxvf file.tar.bz2 </nowiki></pre> This will show you what it extracts, and in most cases will be in a sub directory of <code><nowiki>file</nowiki></code>. To extract a <code><nowiki>tar.gz</nowiki></code>, simply put <code><nowiki>zxvf</nowiki></code> in place of <code><nowiki>jcxf</nowiki></code> in the command line. ==== Creating a tar.bz2 file ==== <pre><nowiki> tar jcvf file.tar.bz2 dir1 dir2 ... </nowiki></pre> file.tar.bz2 is the name of the tar file we wish to create. <code><nowiki>dir1</nowiki></code> and <code><nowiki>dir2</nowiki></code> are the names of the directories and/or files we wish to include in the tar.bz2 archive. To use gzip compression instead of bz2, simply put <code><nowiki>zcvf</nowiki></code> in place of <code><nowiki>jcvf</nowiki></code> in the command line ==== Rar ==== To extract a .rar file: <pre><nowiki> unrar x file.rar </nowiki></pre> ==== zip and unzip ==== To create a zip file containing <code><nowiki>dir1</nowiki></code>, <code><nowiki>dir2</nowiki></code>, ...: <pre><nowiki> zip file.zip dir1 dir1 ... </nowiki></pre> To extract <code><nowiki>file.zip</nowiki></code>: <pre><nowiki> unzip file.zip </nowiki></pre> [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:FileCompression
。