rar

Linux命令总结--打包解压命令

亡梦爱人 提交于 2019-12-01 23:28:07
Linux下的压缩和解压缩工具比较多,有时经常记不住,这里给大家汇总一下,方便大家查阅。 tar -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包中所有文件,-t是解开的意思 压缩

Packing (WinRAR) with a password on a group of files

▼魔方 西西 提交于 2019-12-01 18:31:24
I'll try and make this as short as i can. I'm looking for a .bat file to rar up and password folders with files in them, but the problem is a little more tricky than i thought, each folder can have anything from 1 to 400 files in it, i have two .txt files, one with the desired number of.rar file names and one with the desired number of .rar passwords, so txt doc's look like this, first is filenames.txt : FAD01 FAD02 FAD03 and so on up to FAD110 and another .txt file GAP01 GAP02 GAP03 GAP04 GAP05 and so on upto GAP50 the 1st password .txt file look like this vF2RiQMof6HSWy8MSEIO

Compress a file with RAR

*爱你&永不变心* 提交于 2019-12-01 16:26:56
I have a text file that I want to compress after it gets an specified size. I've already seen GZipStream which works great, but RAR compression is much better. I've been looking for a library that can compress a file with RAR (I really don't care about extracting or uncompressing), but I couldn't find one yet. As the RAR compression algorithm isn't free (only the decompression algorithm is), you won't find a library for it (or have to purchase a license). A good alternative is the LZMA SDK that delivers the compression algorithms used in 7-Zip. For a compression ratio/speed comparison, you can

Regular expression to match only the first file in a RAR file set

非 Y 不嫁゛ 提交于 2019-12-01 12:57:49
To see what file to invoke the unrar command on, one needs to determine which file is the first in the file set. Here are some sample file names, of which - naturally - only the first group should be matched: yes.rar yes.part1.rar yes.part01.rar yes.part001.rar no.part2.rar no.part02.rar no.part002.rar no.part011.rar One (limited) way to do it with PCRE compatible regexps is this: .*(?:(?<!part\d\d\d|part\d\d|\d)\.rar|\.part0*1\.rar) This did not work in Ruby when I tested it at Rejax however. How would you write one Ruby compatible regular expression to match only the first file in a set of

Regular expression to match only the first file in a RAR file set

冷暖自知 提交于 2019-12-01 10:39:08
问题 To see what file to invoke the unrar command on, one needs to determine which file is the first in the file set. Here are some sample file names, of which - naturally - only the first group should be matched: yes.rar yes.part1.rar yes.part01.rar yes.part001.rar no.part2.rar no.part02.rar no.part002.rar no.part011.rar One (limited) way to do it with PCRE compatible regexps is this: .*(?:(?<!part\d\d\d|part\d\d|\d)\.rar|\.part0*1\.rar) This did not work in Ruby when I tested it at Rejax however

Linux的tar压缩解压缩命令

可紊 提交于 2019-12-01 08:38:29
tar 命令语法如下: # tar <选项> <文件> 下面列举 tar 命令中一些常用的选项: --delete : 从归档文件 (而非磁带) 中删除 -r, --append : 将文件追加到归档文件中 -t, --list : 列出归档文件中包含的内容 --test-label : 测试归档文件卷标并退出 -u, --update : 将已更新的文件追加到归档文件中 -x, --extract, --get : 释放归档文件中文件及目录 -C, --directory=DIR : 执行归档动作前变更工作目录到 DIR -f, --file=ARCHIVE : 指定 (将要创建或已存在的) 归档文件名 -j, --bip2 : 对归档文件使用 bzip2 压缩 -J, --xz : 对归档文件使用 xz 压缩 -p, --preserve-permissions : 保留原文件的访问权限 -v, --verbose : 显示命令整个执行过程 -z, gzip : 对归档文件使用 gzip 压缩 注 : 在 tar 命令选项中的连接符 - 是可选的(LCTT 译注:不用 - 也没事。这在 GNU 软件里面很罕见,大概是由于 tar 命令更多受到古老的 UNIX 风格影响)。 参考链接: https://www.jb51.net/article/97215.htm tar -c:

转在Linux下安装rar fou linux

大憨熊 提交于 2019-12-01 03:28:48
在Linux下安装rar fou linux rar for linux 软件下载地址: http://www.rarsoft.com/download.htm 到目前为止最新的版本为4.10 beta 2,这是共享版本。 本文所用的Linux操作系统为: Centos 5.6,内核版本2.6.18-238.12.1.el5.pony6-1,32位版本。 选择RAR 4.10 beta 1 for Linux: $wget http://www.rarsoft.com/rar/rarlinux-4.1.b2.tar.gz 如果是64位的系统,就用RAR 4.10 beta 2 for Linux x64。 用root帐户安装: $su - #tar -zxvf rarlinux-4.1.b2.tar.gz #cd rar #make #make install #exit 安装过程结束。 运行rar –help可以看到帮助信息,如果出现下列信息: #rar: /lib/tls/libc.so.6: version GLIBC_2.4' not found (required by rar) #rar: /lib/tls/libc.so.6: version GLIBC_2.7′ not found (required by rar) 则执行: #cp -f rar_static

CentOS安装rar、7z压缩

徘徊边缘 提交于 2019-12-01 03:26:59
在Linux上常见的压缩格式是tar.gz或tar.bz2,当遇到有rar或7z格式的压缩文件时需要先安装相关软件。系统用的是CentOS6.0。 安装编译所需的软件包: yum install make gcc gcc-c++ 一、安装RAR压缩 1、从官网下载RAR for Linux软件包: cd /tmp wget http://www.rarlab.com/rar/rarlinux-4.1.b5.tar.gz 2、安装 tar -zxvf rarlinux-4.1.b5.tar.gz cd rar make 看到屏幕上出现: mkdir -p /usr/local/bin mkdir -p /usr/local/lib cp rar unrar /usr/local/bin cp rarfiles.lst /etc cp default.sfx /usr/local/lib 就完成了。其实makefile文件里就是创建了这两个目录、复制了几个文件。 3、使用 1)压缩文件 rar a 2.rar message 将message目录压缩到2.rar文件中。 2)解压文件 unrar x 1.rar 解压1.rar文件到当前目录。(unrar e只解压出文件,不会解压出目录结构) 3)列出rar包里的文件 rar l file.rar 4)测试文件的完整性 rar t

工作中常用的linux命令大全

匆匆过客 提交于 2019-12-01 02:02:52
文章内容参考:https://www.cnblogs.com/yjd_hycf_space/p/7730690.html 谢谢大佬的分享 系统信息 date 显示系统日期 cal + 年份 显示该年份的日历表 date 041217002007.00 设置日期和时间 - 月日时分年.秒 clock -w 将时间修改保存到 BIOS 文件和目录 cd 回到根目录 cd .. 回到上一级目录 cd ../.. 回到上两级目录 pwd 当前工作路径 ls 查看目录中的文件 ls -l 显示目录和文件的详细资料 ls -a 显示隐藏文件 ls *[0-9]* 显示包含数字的文件名和目录名 tree 显示文件和目录由根目录开始的树形结构 lstree 显示文件和目录由根目录开始的树形结构 mkdir dir1 创建一个叫做 'dir1' 的目录' mkdir dir1 dir2 同时创建两个目录 mkdir -p /tmp/dir1/dir2 创建一个目录树 rm -f file1 删除一个叫做 'file1' 的文件' rmdir dir1 删除一个叫做 'dir1' 的目录' rm -rf dir1 删除一个叫做 'dir1' 的目录并同时删除其内容 rm -rf dir1 dir2 同时删除两个目录及它们的内容 mv dir1 new_dir 重命名/移动 一个目录 如果new

压缩

冷暖自知 提交于 2019-11-30 15:12:39
Linux 下常用压缩命令 tar, tar.gz(tgz), tar.bz2,zip tar 命令 tar.gz tgz tar.bz gz zip rar tar 打包调用规则: tar -cvf examples.tar files|dir 释放调用规则: tar -xvf examples.tar (解压至当前目录下) tar -xvf examples.tar -C /path (/path 解压至其它路径) 参数说明: -c, --create create a new archive 创建一个归档文件 -v, --verbose verbosely list files processed 显示创建归档文件的进程 -f, --file=ARCHIVE use archive file or device ARCHIVE 后面要立刻接被处理的档案名,比如--file=examples.tar -x, --extract, extract files from an archive 从一个归档文件中提取文件 举例: # 打包 tar -cvf file.tar file1 #file1 文件 tar -cvf file.tar file1 file2 #file1,file2 文件 tar -cvf file.tar dir #dir 目录 # 释放 tar -xvf