tar

What is a good commercial tar stream lib for c# and .net?

╄→尐↘猪︶ㄣ 提交于 2019-12-06 09:33:54
We are currently using SharpZipLib but since it uses the GPL we need to replace it with a commercial lib. See my comment about #ziplib on the main post... but if you really need a commercial product (not open-source), IP*Works! Zip .NET might fit the bill. It does have TAR support according to this . Have you looked at DotNetZip ? It is not under the GPL, but rather the Microsoft Public License (Ms-PL). Just FYI. There is an option to use BSD licensed library for tar reading/writing. Gzip compression and decompression you can do with build-in GZipStream from microsoft .NET 2.0 http://code

Linux常用指令

≡放荡痞女 提交于 2019-12-06 07:10:00
常用指令 ls   显示文件或目录 -l 列出文件详细信息l(list) -a 列出当前目录下所有文件及目录,包括隐藏的a(all) mkdir 创建目录 -p 创建目录,若无父目录,则创建p(parent) cd 切换目录 (cd / 返回首页;cd .. 返回上级目录) touch 创建空文件 echo 创建带有内容的文件。 cat 查看文件内容 cp 拷贝 mv 移动或重命名 rm 删除文件 (rm -rf 选中的全部删除) -r 递归删除,可删除子目录及文件 -f 强制删除 find 在文件系统中搜索某文件 wc 统计文本中行数、字数、字符数 grep 在文本文件中查找某个字符串 rmdir 删除空目录 tree 树形结构显示目录,需要安装tree包 pwd 显示当前目录 ln 创建链接文件 more、less 分页显示文本文件内容 head、tail 显示文件头、尾内容 ctrl+alt+F1 命令行全屏模式 系统管理命令 stat 显示指定文件的详细信息,比ls更详细 who 显示在线登陆用户 whoami 显示当前操作用户 hostname 显示主机名 uname 显示系统信息 top 动态显示当前耗费资源最多进程信息 ps 显示瞬间进程状态 ps -aux du 查看目录大小 du -h /home带有单位显示目录信息 df 查看磁盘大小 df -h

tar文件归档

瘦欲@ 提交于 2019-12-06 06:39:37
tar 是UNIX和类UNIX系统上的压缩,备份工具, 名字来源于Tape archive--磁盘归档,最初的时候是用来将数据储存,备份到磁带上的。而今最简单的备份方法是添加新的磁盘或者在云端存储,但即使是最简单和便宜的磁盘设备和云储存,也应该压缩备份数据,降低存储空间需求和传输时间,linux系统默认包涵tar命令,其语法简单,而且文件格式具有可移植性。 归档与压缩有一定的差别,归档是将一个或众多源文件打包成一个文件,文件大小不改变,且源文件仍保留,通常以tar作为后缀名;而压缩是使用一系列算法,减小文件大小的操作,而且一般的压缩只能压缩一个文件,所以当我们需要压缩的文件很多时,我们就需要将众多文件先归档,然后在一起压缩,如果一个文件的后缀名是tar我们就可以认为它是一个归档文件。 归档(部分操作) 使用tar创建归档文件,并进行更新,检查: 如下创建一个归档文件:-f 表示指定归档文件名,-c 表示创建一个归档文件: text.tar为生成的归档文件名,test.txt, test2.txt...为源文件 -t选项列出归档文件中包含的文件: 当有多个选项时,-f选项总是在最后,并且跟一个文件名称;对于会在终端生成报告的命令,-v是一个约定的选项,该选项回显示更多的细节例如文件权限,所有者所属的分组,文件修改日期等,相当于ls 的-l选项 向归档文件中追加文件,使用选项-r:

After tar/untar of git repo, gitk shows “Local uncommitted changes, not checked in to index”

天大地大妈咪最大 提交于 2019-12-06 06:22:16
问题 I have a directory containing a small git repository. git status, and gitk --all, show no uncommitted changes. If I tar/compress this directory with: tar czf git-repo.tar.gz git-repo/ Then transfer this tar file to a test directory and untar with: tar xzf git-repo.tar.gz When I cd test/git-repo/ gitk --all gitk shows a line at the top of all the commits (with the usual red dot): "Local uncommitted changes, not checked in to index" git status still shows: On branch master nothing to commit,

Linux服务器下载与上传文件

我的未来我决定 提交于 2019-12-06 05:10:03
一、图形化工具 FileZilla、SecureCRT,连接Linux服务器后直接操作 二、命令 使用终端模拟软件连接服务器后,首先安装lrzsz工具包 yum install lrzsz rz ,上传文件 sz filename ,下载文件(只能下载文件,文件夹考虑先打包 tar -czvf xxx.tar.gz xxx/ 将xxx文件夹打包压缩为xxx.tar.gz文件) 来源: https://www.cnblogs.com/lingblog/p/11963489.html

How to untargz files using maven?

本小妞迷上赌 提交于 2019-12-06 02:53:14
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 ? 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 khmarbaise I would suggest to use the truezip-maven-plugin to handle such archives. 来源: https://stackoverflow.com/questions/14519146/how-to-untargz-files-using-maven

【Linux常见命令】tar命令

℡╲_俬逩灬. 提交于 2019-12-06 02:28:14
【独立命令,只能用其中一个,和别的命令连用】这五个是独立的命令,压缩解压都要用到其中一个,可以和别的命令连用但只能用其中一个。 -c: 建立压缩档案 -x:解压 -t:查看内容 -r:向压缩归档文件末尾追加文件 -u:更新原压缩包中的文件 【可选参数】下面的参数是根据需要在压缩或解压档案时可选的。 -z:有gzip属性的 -j:有bz2属性的 -Z:有compress属性的 -v:显示所有过程 -O:将文件解开到标准输出 【必须参数】下面的参数-f是必须的 -f: 使用档案名字,切记,这个参数是最后一个参数,后面只能接档案名。 【示例】 # tar -cf all.tar *.jpg 这条命令是将所有.jpg的文件打成一个名为all.tar的包。-c是表示产生新的包,-f指定包的文件名。 # tar -rf all.tar *.gif 这条命令是将所有.gif的文件增加到all.tar的包里面去。-r是表示增加文件的意思。 # tar -uf all.tar logo.gif 这条命令是更新原来tar包all.tar中logo.gif文件,-u是表示更新文件的意思。 # tar -tf all.tar 这条命令是列出all.tar包中所有文件,-t是列出文件的意思 # tar -xf all.tar 这条命令是解出all.tar包中所有文件,-x是解开的意思 【压缩】 tar

Extracting .tar file isn't working

余生颓废 提交于 2019-12-06 00:39:34
问题 Thanks ahead of time for all your help guys! As a beginner user I really appreciate the help! My Machine/OS: Mac OSX 10.5.8, 32-bit What I'm trying to do: Extract and install Apache Maven, from the website. What I've done: Downloaded the binary .tar.gz file from the website, and using the shell, moved the downloaded file to the appropariate directory, and extracted the .tar out of the .tar.gz by using gunzip -v filename.tar.gz , resulting a .tar file. Now I'm trying to extract the .tar file

Extract all files with directory path in given directory

核能气质少年 提交于 2019-12-05 23:13:30
问题 I have a tar archive in which I have a directory which I need to extract in a given directory. For example: I have a directory TarPrefix/x/y/z in a tar archive I want to extract it in a given target directory for example: extracted/a/ this directory should contain all the files and directories contained in directory TarPrefix/x/y/z. subdir_and_files = [ tarinfo for tarinfo in tar.getmembers() if tarinfo.name.startswith("subfolder/") ] to get the list of all the members in the directory path

How can I archive a directory in Perl like tar does in UNIX?

Deadly 提交于 2019-12-05 23:01:00
问题 I want to archive a directory (I don't know whether I can call "I want to tar a directory"). I want to preserve the access permissions at the other end when I un-tar it. I should I tackle this problem in perl. Thanks for the response but why I'm asking for doing it Perl is I want it independent of the platforms. I want to transfer one big file to multiple machines. Those machines can be of any platform. I should be able to untar this tar file properly right? So I want to write my own tar and