tar

Modifying files nested in tar archive

早过忘川 提交于 2019-12-24 00:37:16
问题 I am trying to do a grep and then a sed to search for specific strings inside files, which are inside multiple tars, all inside one master tar archive. Right now, I modify the files by First extracting the master tar archive. Then extracting all the tars inside it. Then doing a recursive grep and then sed to replace a specific string in files. Finally packaging everything again into tar archives, and all the archives inside the master archive. Pretty tedious. How do I do this automatically

excluding some folders in tar command not work

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 16:10:46
问题 I run this command to compress the content of current folder while excluding some directories: mahmood@mpc:set3-HHLL$ l file1.txt a/ c/ file2.inp b/ ... mahmood@mpc:set3-HHLL$ tar cvjf ../set3.tar.bz2 * --exclude=a/ --exclude=b/ --exclude=c/ However in the output I see: file1.txt file2.inp a/1.out a/2.out 2/1.out ... Why it ignores the command line options? 回答1: The correct command would be: tar cvjf ../set3.tar.bz2 * --exclude='a' --exclude='b' --exclude='c' 来源: https://stackoverflow.com

unwanted tar,zip,jar disributions in gradle build

白昼怎懂夜的黑 提交于 2019-12-23 15:38:38
问题 I am doing gradle build, which includes a number of projects. When i run gradle build command its generating unwanted bundles like tar,zip. So what should i do to exclude these tasks am using war plugin to generate war ( apply plugin: 'war' ). am also using following plugins apply plugin: 'spring-boot' apply plugin: 'org.asciidoctor.gradle.asciidoctor' apply plugin: 'war' am also using plugin asciidoctor UPDATE I have used distTar.enabled = false distZip.enabled = false To solve this, but

CentOS 6.5 编译安装 LNMP环境

喜夏-厌秋 提交于 2019-12-23 12:27:19
具体参考: http://www.centoscn.com/CentosServer/www/2015/0422/5245.html http://www.cnblogs.com/zhoulf/archive/2013/02/09/2909653.html 建立一个软件包目录存放 mkdir -p /usr/local/src/ 清理已经安装包 rpm -e httpd rpm -e mysql rpm -e php yum -y remove httpd yum -y remove mysql yum -y remove php #搜索apache包 rpm -qa http* #强制卸载apache包 rpm -e --nodeps 查询出来的文件名 #检查是否卸载干净 rpm -qa|grep http* selinux可能会致使编译安装失败,我们先禁用它。永久禁用,需要重启生效 sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config 临时禁用,不需要重启 setenforce 0 安装必备工具 yum -y install make gcc gcc-c++ gcc-g77 flex bison file libtool libtool-libs autoconf kernel-devel

having cv2.imread reading images from file objects or memory-stream-like data (here non-extracted tar)

风格不统一 提交于 2019-12-23 12:20:13
问题 I have a .tar file containing several hundreds of pictures ( .png ). I need to process them via opencv. I am wondering whether - for efficiency reasons - it is possible to process them without passing by the disc. In other, words I want to read the pictures from the memory stream related to the tar file. Consider for instance import tarfile import cv2 tar0 = tarfile.open('mytar.tar') im = cv2.imread( tar0.extractfile('fname.png').read() ) The last line doesn't work as imread expects a file

PaxHeaders in tarball

半腔热情 提交于 2019-12-23 08:51:03
问题 I'm doing a tar like in C, and I've got a problem. I just want to archive and unarchive files and diretory, so I operate this command : tar -cvf NAME.tar FILE1 [FILE2...] Now I'm trying to get the header POSIX of this archive : struct posix_header { /* byte offset */ char name[100]; /* 0 */ char mode[8]; /* 100 */ char uid[8]; /* 108 */ char gid[8]; /* 116 */ char size[12]; /* 124 */ char mtime[12]; /* 136 */ char chksum[8]; /* 148 */ char typeflag; /* 156 */ char linkname[100]; /* 157 */

tar.gz文件的压缩与解压

一曲冷凌霜 提交于 2019-12-23 05:34:36
1 解压”.xz” xz -d your_file_name.tar.xz 注:运行上述命令后your_file_name.tar.xz会被删除 2 解包“.tar” tar -xvf your_file_name.tar 注:运行上述命令后your_file_name.tar会被删除 注: 1.“.xz”是一种压缩文件格式。Linux系统中常使用的压缩文件格式还有“.gz”,”.bz2”等。关于xz的更多内容,可以使用“man xz”查看。 2.“.tar”是一个文件打包格式。tar命令本身只用于打包或解包,tar本身并没有压缩和解压缩的功能。关于tar的更多内容,可以使用“man tar”查看。 3.压缩 tar -zcvf tar -zcvf file1 file2.tar.gz 参考链接: Linux下解压后缀名为".tar.xz"的文件 来源: https://www.cnblogs.com/cosmos-wong/p/11992952.html

How to untargz files using maven?

痴心易碎 提交于 2019-12-22 10:27:59
问题 Using maven, I download some Chef cookbooks. Received files are in the .tgz format, and I want to unpack them. How can I do that ? Is there any useful plugin ? 回答1: From what I know, .tgz can be unpack via two commands: gzip -d file.tgz tar xvf file.tar So you can use maven-antrun-plugin to execute these two tasks: <gunzip src="tools.tgz"/> <untar src="tools.tar" dest="${tools.home}"/> Ant task reference: gunzip and untar 回答2: I would suggest to use the truezip-maven-plugin to handle such

Organizing files in tar bz2 file with python

霸气de小男生 提交于 2019-12-22 09:28:37
问题 I have about 200,000 text files that are placed in a bz2 file. The issue I have is that when I scan the bz2 file to extract the data I need, it goes extremely slow. It has to look through the entire bz2 file to fine the single file I am looking for. Is there anyway to speed this up? Also, I thought about possibly organizing the files in the tar.bz2 so I can instead have it know where to look. Is there anyway to organize files that are put into a bz2? More Info/Edit: I need to query the

TAR encode/decode library for iPhone (ideally cocoa) [closed]

左心房为你撑大大i 提交于 2019-12-22 03:56:45
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Does anyone know of any library/code that will enable me to encode and decode .tar formatted data - that I can use in my iPhone project (preferably cocoa) Thanks in advance Craig UPDATE: I've taken a look at the suggested libraries and come to the conclusion that they are making waaaay to much of the problem -