rar

RAR archives with java [closed]

徘徊边缘 提交于 2019-11-27 01:26:42
Is there a good java API for manipulating RAR archive files someone could recommend? Googling did not turn up anything overwhelmingly convincing. Fabian Steeg You could try JUnRar , "a RAR handling API implemented in pure Java" (quoting the site). There is also this fork from SF(@Fabian's answer and this one are forked from an old SF project): https://github.com/jukka/java-unrar I think this will help you. raroscope A pure Java library for scanning and enumerating RAR archive contents 来源: https://stackoverflow.com/questions/561107/rar-archives-with-java

How to programmatically extract / unzip a .7z (7-zip) file with R

大憨熊 提交于 2019-11-27 00:44:03
问题 I'm trying to automate the extraction of a number of files compressed with 7-zip. I need to automate this process, because a) there are many years of data I'd like to unlock and b) I'd like to share my code with others and prevent them from repeating the process by hand. I have both WinRAR and 7-zip installed on my computer, and I can individually open these files easily with either program. I've looked around at the unzip untar and unz commands, but I don't believe any of them do what I need

.rar, .zip files MIME Type

会有一股神秘感。 提交于 2019-11-27 00:10:42
I'm developing a simple php upload script, and users can upload only ZIP and RAR files. What MIME types I should use to check $_FILES[x][type] ? (a complete list please) Thank you.. Gfy The answers from freedompeace, Kiyarash and Sam Vloeberghs: .rar application/x-rar-compressed, application/octet-stream .zip application/zip, application/octet-stream, application/x-zip-compressed, multipart/x-zip I would do a check on the file name too. Here is how you could check if the file is a RAR or ZIP file. I tested it by creating a quick command line application. <?php if (isRarOrZip($argv[1])) { echo

彻底解决Ubuntu上RAR压缩包乱码问题

好久不见. 提交于 2019-11-26 21:02:07
安装Linux版7zip: sudo apt-get install p7zip p7zip-full p7zip-rar 卸载可能安装过的rar相关包(默认是没有安装的): sudo apt-get remove rar unrar 经过这样操作,以后解压rar文件时,file-roller(归档管理器)自动会调用7z来解压,而7z能识别中文编码,不会出现乱码, 解压和压缩都通过图形程序file-roller操作,完全不用涉及命令行。 如果不卸载掉rar,file-roller默认使用rar解压,而rar不能识别中文编码,所以可能会出现乱码。当然你也就不能在Linux上创建rar文件了,但有必要打包成rar格式吗? unrar虽然能识别中文编码,但它和rar一样不是自由软件,它们都是WinRAR那家公司的商业软件,既然7z能解压rar文件,我又何必用它呢? 总之file-roller默认使用7z解压7z/rar,创建7z包时也是使用7z,所以统一使用7z格式能保证自己的压缩包不会乱码。在Linux创建7z包时,也可以像Windows版那样加密压缩包目录。 来源: oschina 链接: https://my.oschina.net/u/561214/blog/82943

Linux压缩和解压缩【转载】

末鹿安然 提交于 2019-11-26 18:37:10
.tar 解包:tar xvf FileName.tar 打包:tar cvf FileName.tar DirName (注:tar是打包,不是压缩!) --------------------------------------------- .gz 解压1:gunzip FileName.gz 解压2:gzip -d FileName.gz 压缩:gzip FileName .tar.gz 和 .tgz 解压:tar zxvf FileName.tar.gz 压缩:tar zcvf FileName.tar.gz DirName --------------------------------------------- .bz2 解压1:bzip2 -d FileName.bz2 解压2:bunzip2 FileName.bz2 压缩: bzip2 -z FileName .tar.bz2 解压:tar jxvf FileName.tar.bz2 压缩:tar jcvf FileName.tar.bz2 DirName --------------------------------------------- .bz 解压1:bzip2 -d FileName.bz 解压2:bunzip2 FileName.bz 压缩: 未知 .tar.bz 解压:tar jxvf

Debian下rar

会有一股神秘感。 提交于 2019-11-26 18:16:28
我的用apt-get安不了,就用下面方法弄的: 1.下载rar wget http://www.rarlab.com/rar/rarlinux-3.5.1.tar.gz或直接点这个链接下载 2.解压缩: 右击解压 或 $tar -zxvf rarlinux-3.5.1.tar.gz 3.目录下的rar、unrar、rar_static 都放到$PATH的某个目录下,比如/usr/local/bin或者~/bin 其实这一步可以用 $make $make install 代替 4.这时rar就安好了,但是我装了之后不能用,用 $ldd -v unrar 查看,结果发现 前两行有: libstdc++.so.5 =>not found 所以上网搜,用 $apt-get install libstdc++5装上就好了 至此就能用rar了 。 转载于:https://www.cnblogs.com/beilon/archive/2008/07/18/1246401.html 来源: https://blog.csdn.net/weixin_30555515/article/details/99009406

【转】linux解压zip和rar

无人久伴 提交于 2019-11-26 16:26:33
1)对于.zip linux下提供了zip和unzip程序,只需yum install unzip即可,zip是压缩程序,unzip是解压程序。它们的参数选项很多,这里只做简单介绍,依旧举例说明一下其用法: ? 1 # zip all.zip *.jpg 这条命令是将所有.jpg的文件压缩成一个zip包 ? 1 # unzip all.zip 这条命令是将all.zip中的所有文件解压出来 2)对于.rar 要在linux下处理.rar文件,需要安装RAR for Linux,可以从网上下载,但要记住,RAR for Linux 不是免费的;可从http://www.rarsoft.com/download.htm下载RARfor Linux 3.2. 0,然后安装: 链接:https://pan.baidu.com/s/1ECj46FDW8R6yQpQXjKy6LA 提取码:p61s ? 1 2 3 # tar -xzpvf rarlinux-3.2.0.tar.gz # cd rar # make 这样就安装好了,安装后就有了rar和unrar这两个程序,rar是压缩程序,unrar 是解压程序。它们的参数选项很多,这里只做简单介绍,依旧举例说明一下其用法: ? 1 # rar a all *.jpg 这条命令是将所有.jpg的文件压缩成一个rar包,名为all.rar

压缩和解压缩命令

守給你的承諾、 提交于 2019-11-26 14:58:41
【题注】涉及压缩格式: tar、gzip、gunzip、bzip2、bunzip2、compress、uncompress、 zip、unzip、rar、unrar 试用文件注释: .tar、.gz、.tar.gz、.tgz、.bz2、.tar.bz2、. Z、.tar.Z、.zip、.rar 【个人经验】 解压缩命令: tar -d xxx.tar.xz tar -xvf xxx.tar tar -jxvf xxx.tar.bz2 tar -zxvf xxx.tar.gz 1 tar 1.1 命令详解: 主选项: 这五个是独立的命令,压缩解压都要只用到其中一个,可以和别的命令连用。下面的参数是根据需要在压缩或解压档案时可选的。 -c 压缩 -x 解压 -t 查看内容 -r 向压缩归档文件末尾追加文件 -u 更新原压缩包中的文件 辅助选项: -b 该选项是为磁带机设定的。其后跟一数字,用来说明区块的大小。 -k 保存已经存在的文件。遇到相同的文件,不会进行覆盖。 -m 在还原文件时,把所有文件的修改时间设定为现在。 -M 创建多卷的档案文件,以便在几个磁盘中存放。 -v 详细报告tar处理的文件信息。如无此选项,tar不报告文件信息。 -w 每一步都要求确认。 -z 用gzip来压缩/解压缩文件。 参数-f是必须的 -f 使用档案名字,这个参数是最后一个参数,后面只能接档案名。 1

服务器oracle数据库定时备份

半腔热情 提交于 2019-11-26 12:18:59
首先要先建立一个.bat的文件 然后执行这个bat文件 测试是否能得到这个收据库的打包文件。 bat文件内容: @echo off @color b del /f /s /q D:\oracle\backup\dump\jx_hnyl.dmp --删除服务器上面的备份文件 留下压缩文件就可以了 节省内存 exp jx_hnyl/jx_hnyl@orcl owner=jx_hnyl log=D:\oracle\backup\dump\jx_hnyl file=D:\oracle\backup\dump\jx_hnyl.dmp --将数据库服务器上的文件导出来 Rar.exe a -ag -k -r -s -iback D:\oracle\backup\dump\jx_hnyl.rar D:\oracle\backup\dump\jx_hnyl.dmp --将dmp文件打包成rar文件 看电脑上面安装的是什么打包软件 rar命令不一样 del /f /s /q D:\oracle\backup\dump\jx_hnyl.dmp --删除dmp文件 只留下rar文件 然后在 开win7"开始"按钮,依次选择打开“所有程序 >> 附件 >> 系统工具 >> 任务计划程序 3、在“任务计划程序”设置面板中,点击“操作 >> 创建基本任务” 4、输入新建任务的名称和描述,点击“下一步”按钮 5

.rar, .zip files MIME Type

独自空忆成欢 提交于 2019-11-26 08:01:01
问题 I\'m developing a simple php upload script, and users can upload only ZIP and RAR files. What MIME types I should use to check $_FILES[x][type] ? (a complete list please) Thank you.. 回答1: The answers from freedompeace, Kiyarash and Sam Vloeberghs: .rar application/x-rar-compressed, application/octet-stream .zip application/zip, application/octet-stream, application/x-zip-compressed, multipart/x-zip I would do a check on the file name too. Here is how you could check if the file is a RAR or