tar

How does one unpack a tar file in Android?

守給你的承諾、 提交于 2020-01-23 01:05:14
问题 I'm not overly familiar with tar, so, this may be a stupid question, but I have a situation where I want to grab a tarball from the server (preferably compressed, but that's not essential), download it on to the device and untar it. I'm not seeing any standard library to do this... am I overlooking it, or does it not exist? [EDIT] I'm attempting to do this in my app by means of some API or library that handles unpacking tars - I'm not looking for an app that un-tars stuff on my device. 回答1: I

打包发布Python模块或程序,安装包

怎甘沉沦 提交于 2020-01-22 08:02:09
Python模块、扩展和应用程序可以按以下几种形式进行打包和发布: python setup.py获取帮助的方式 python setup.py --help python setup.py --help-commands 所有可以使用的命令,如build,install python setup.py COMMAND --help 获取特定命令的帮助 python setup.py COMMAND --help-formats 获取特定命令支持使用的格式 打包 1.压缩文件(使用distutils) Windows的Zip文件和类Unix平台的.tar.gz文件 2.自动解包或自动安装可执行文件 Windows中的.exe文件 3.自包含的,不要求安装的预备运行科执行程序 Windows的.exe文件、Unix上带有一个小的脚本前缀的ZIP压缩文件、Mac上的.app文件等 4.平台相关的安装程序 Windows上的.msi文件、Linux上常见的.rpm、src.rpm和.dep文件等 5.Python eggs 较流行的第三方扩展 发布 “发布”是指一个文件集合,这些文件联合在一起可使用distutils构建、打包和发布模块 创建好的发布可以用于安装,可上传到ftp,上传到各大网络让人下载,也可上传到PyPI与他人共享 创建发布 将各代码文件组织到模块容器中

“Untar” file on iPhone

放肆的年华 提交于 2020-01-21 02:59:26
问题 I'm writing an iPhone app which downloads a tar-gzipped file from a Webserver, then needs to unarchive this file so that it can be copied into the app's Documents folder. I'm using tar/gzip because I want to download a whole bunch of small files in one HTTP request, to make everything nice and fast. I've investigated solutions like http://www.feep.net/libtar/, but as a C/Objective-C newb, I can't get any of them to compile for the iPhone platform. (I felt like I should just be able to do a

linux 下 压缩文件

谁说我不能喝 提交于 2020-01-20 03:42:20
一、zip格式 zip可能是目前使用的最多的文档压缩格式。它最大的优点就是在不同的操作系统平台上使用。缺点就是支持 的压缩率不是很高,而tar.gz和tar.bz2在压缩率方面做得非常好。 我们可以使用下列的命令压缩一个文件: zip -r archive_name.zip filename (-r是压缩文件) 下面是如果解压一个zip文件: unzip archive_name.zip (解压文件在当前文件下) unzip archive_name.zip -d new_dir (解压文件可以将文件解压缩至一个你指定的的目录,使用-d参数) 二、tar格式 tar是在Linux中使用得非常广泛的文档打包格式。它的好处就是它只消耗非常少的CPU以及时间去打包文件,它 仅仅只是一个打包工具,并不负责压缩。下面是如何打包一个目录: tar -cvf archive_name.tar directory_to_compress -c参数是建立新的存档 -v参数详细显示处理的文件 -f参数指定存档或设备 打包之后如何解包: tar -xvf archive_name.tar 上面这个解包命令将会将文档解开在当前目录下面。当然,你也可以用下面的这个命令来解包到指定的路径: tar -xvf archive_name.tar -C new_dir (解包的参数是-C,不是小写c) 三、tar

linux多线程下载工具 mwget

南笙酒味 提交于 2020-01-18 02:05:45
使用wget下载文件时十分缓慢 可使用mwget进行加速 其中m代表多线程的意思 1.安装mwget wget http://jaist.dl.sourceforge.net/project/kmphpfm/mwget/0.1/mwget_0.1.0.orig.tar.bz2 tar -xjvf mwget_0.1.0.orig.tar.bz2 cd mwget_0.1.0.orig 执行./configure ./configure 如果出现 error: C++ compiler cannot create executables 说明没有安装c++编译器 安装一个c++编译器就可以了 yum install gcc-c++ 如果执行./configure 出现 configure: error: Your intltool is too old. You need intltool 0.35.0 or later. 需要安装0.35.0以上的版本 yum install intltool 然后做最后的安装 make make install 安装完毕后 可以使用mwget下载 mwget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz mwget功能选项 mwget --help #执行后可以直接看到帮助说明

snort安装使用教程(CentOS6.5)

孤街醉人 提交于 2020-01-17 08:51:39
官网: https://www.snort.org/ 官方文档: https://www.snort.org/documents 2.安装 2.1安装依赖 yum install flex bison -y yum install libpcap libpcap-devel zlib zlib-deve* -y yum install glibc-headers gcc-c++ make -y tar -zxf libdnet-1.11.tar.gz cd libdnet-1.11 ./configure && make && make installtar zxf pcre-8.39.tar.gz ./configure make && make install 如果不安装这些依赖,在后边执行configure时会有报错 2.2安装daq tar -zxf daq-2.0.6.tar.gz cd daq-2.0.6 ./configure make make install configure报错:configure: error: Your operating system's lex is insufficient to compile libsfbpf. You should install both bison and flex. 处理:yum install flex

Tarring only the files of a directory

六月ゝ 毕业季﹏ 提交于 2020-01-17 02:28:37
问题 If I have a folder with a bunch of images, how can I tar ONLY the images and not the folder structure leading to the images without having to CD into the directory of images? tar czf images.tgz /path/to/images/* Now when images.tgz is extracted, the contents that are extracted are /path/to/images/... How I can only have the images included into the tgz file (and not the three folders that lead to the images)? 回答1: I know you can use --strip-components when untarring although I'm not sure if

linux 命令 - 打包命令 tar

大憨熊 提交于 2020-01-16 02:36:02
打包命令: tar -cvf 打包文件名 源文件名 -c  打包 -v  显示过程 -f  指定打包后的文件名 例如:tar -cvf longls.tar longls 解包命令: tar -xvf 打包文件名 -x  解包 压缩成.tar.gz格式 tar -zcvf 压缩包.tar.gz名 源文件名 -z  压缩成.tar.gz格式 注:可以对过个文件或目录进行打包压缩 例如:tar -zcvf aaa.tar.gz aaa bbb ccc 解压缩.tar.gz格式 tar -zxvf 压缩包.tar.gz -C   指定解压缩路径(大写c) 例如:tar -zxvf aaa.tar.gz -C /tmp/ -t  不解压缩,只查看内容 例如:tar -ztvf aaa.tar.gz 压缩成.tar.bz2格式 tar -jcvf 压缩包.tar.bz2 源文件名 -j  压缩成.tar.bz2格式 解压缩.tar.bz2格式 tar -jxvf 压缩包.tar.bz2 -C  指定解压缩路径 -t  不解压缩,只查看内容 来源: https://www.cnblogs.com/xiaoluweb/p/4746562.html

Can Ant's tar task set a Linux file permission even when the task is used on other platforms?

流过昼夜 提交于 2020-01-15 11:42:08
问题 Starting with Ant 1.7, the TarFileSet is available which seems to allow file permission modifications in the tar archive. Does this feature work platform-independent, so that I can for example create a tar file on Windows and set execution permissions for script files in this archive which will have this flag if the file is unpacked on Linux? 回答1: Yes, you can set permissions using tarfileset, using the filemode and dirmode attributes. This works when creating tar archives, even on windows.

Can Ant's tar task set a Linux file permission even when the task is used on other platforms?

。_饼干妹妹 提交于 2020-01-15 11:41:34
问题 Starting with Ant 1.7, the TarFileSet is available which seems to allow file permission modifications in the tar archive. Does this feature work platform-independent, so that I can for example create a tar file on Windows and set execution permissions for script files in this archive which will have this flag if the file is unpacked on Linux? 回答1: Yes, you can set permissions using tarfileset, using the filemode and dirmode attributes. This works when creating tar archives, even on windows.