首页 > 其他分享 >解压

解压

时间:2023-04-20 09:36:18浏览次数:34  
标签:解压 files tar Pictures gz Community file

If you want the files to be extracted to a particular destination you can add -C /destination/path/
Make sure you make the directory first, in this case: ~/Pictures/Community

mkdir ~/Pictures/Community
tar xf community_images.tar.gz -C /home/emmys/Pictures/Community/

or

tar -xvzf community_images.tar.gz -C some_custom_folder_name

f: this must be the last flag of the command, and the tar file must be immediately after. It tells tar the name and path of the compressed file.
z: tells tar to decompress the archive using gzip
x: tar can collect files or extract them. x does the latter.
v: makes tar talk a lot. Verbose output shows you all the files being extracted.

参考:
[1] https://askubuntu.com/questions/25347/what-command-do-i-need-to-unzip-extract-a-tar-gz-file

标签:解压,files,tar,Pictures,gz,Community,file
From: https://www.cnblogs.com/xiaoxu-xli/p/17335601.html

相关文章

  • linux如何解压.7z文件
    linux上传的filename.7z文件如何解压?1.linux上先安装p7zipyuminstall-yp7zip2.解压filename.7z文件7zaxfilename.7z3.实例截图 ......
  • Java SpringBoot 7z 压缩、解压
    JavaSpringBoot7z压缩、解压cmd7z文件压缩7z压缩测试添加依赖<dependency><groupId>org.apache.commons</groupId><artifactId>commons-compress</artifactId><version>1.12</version></dependency><dependency......
  • Linux_压缩解压详解
    linuxzip命令 zip-rmyfile.zip./*将当前目录下的所有文件和文件夹全部压缩成myfile.zip文件,-r表示递归压缩子目录下所有文件. 2.unzipunzip-o-d/home/sunnymyfile.zip把myfile.zip文件解压到/home/sunny/-o:不提示的情况下覆盖文件;-d:-d/home/sunny指明将文件解压缩到......
  • gzip 解压文件报错 gzip.BadGzipFile: Not a gzipped file (b'\n')
          因为获取的是Unicode码,需要decode才会正常解决办法:按行获取然后......
  • Linux中zip解压大压缩包失败
    Linux中zip解压大压缩包失败一、背景在linux中,使用unzip解压几个超过4G的文件,可能会报错。 二、原因部分版本的zip,不支持4G以上的压缩包,需要么升级到最新版本的unzip 三、解决安装p7zip,来解压zip包下载地址:http://sourceforge.net/projects/p7zip/files/p7zip/tar-......
  • 使用paramiko上传文件到Linux并且解压
    思路是,使用zipfile对文件进行压缩,之后使用paramiko提供的SFTPClient()上传文件,之后使用paramiko的SSHClient()执行Linux命令操作文件importosimportzipfileimportparamiko#使用zipfile压缩文件defzip_code(dir_name,zip_name):file_list=[]ifos.path.is......
  • C# 压缩与解压操作
    依赖:.NETFramework4.5及以上,引用-添加引用-程序集System.IO.CompressionSystem.IO.Compression.FileSystem 针对文件夹的最简单的压缩与解压缩1、目录必须存在2、无法覆盖文件 publicstaticvoidDoZipFile(List<string>AllFiles,stringFileDir,stringOutputDi......
  • Debian下的压缩 (zip) 解压缩 (unzip) 命令
    安装aptinstall-yzipzip命令zip-rfilename.zip./*-r选项是指递归地(recursively)压缩指定目录(./当前目录)中的所有文件和文件夹zip-rfilename.zipfile1file2file3/path把file1、file2、file3、以及/path目录的内容(假设这个目录存在)压缩起来,......
  • 使用zip命令删除压缩包中的某个文件?(不解压),向压缩包增加文件?
    1、删除压缩包中的文件 如何在不解压压缩包的情况下,删除压缩包中的某个文件? 下面通过一个例子,说明整个过程... 现在,在环境中存在一个压缩包(war)[root@nccztsjb-node-01tmp0]#ls-ltrtotal421448-rw-r--r--1rootroot431560771Mar3113:50ROOT.war[root@nc......
  • Linux环境下如何解压jar包,压缩jar包文件
    1.解压jar包文件里面的文件jarxvfjarxvftest.jarBOOT-INF/classes/com/hsc/test/MyTest.class解释说明:解压test.jar包里面的MyTest.class文件到当前目录下解压后我们......