Detailed description of java zip and rar tool use tutorials, zip tool class
Detailed description of java decompress zip and rar tool class use tutorials directly on the code
Package decompress; import java. io. file; import java. io. fileOutputStream; import org. apache. tools. ant. project; import org. apache. tools. ant. taskdefs. expand; import de. innosystec. unrar. archive; import de.innow.ec.unrar.rar
Under Windows RAR is a common compressed file format, many friends will be packaged into a RAR file into the CentOS server but do not know how to extract.
There have been a lot of customers consulting how to extract the RAR under the CentOS compressed files, so I sorted out, GU has this article.
To extract the RAR fi
Use WinRAR in C # to encrypt and compress files
This example mainly implements:
1. compress the folder and its files
2. compress files in a folder
3. the compressed folder and its files are rar or zip
4. Extract
5. Encrypted compression and unencrypted Compression
-----------
The sample code is as follows:
?
Protected
Objective: to enable CentOS to automatically install rar and unrar environments using yum: Perform the following steps: 1. edit the dag. repo file, or create a new dag. repo file. Vi/etc/yum. repos. d/dag. repo2. add code to the file. This file is an empty file. add the content to the file, and then: wq save
Objective: to enable CentOS to automatically install rar and unrar with yum
System environment:CentO
Split splitting large filesSystem defaults to self-containing# split-b 2048m AA Aa_-B N[BKM] B. Behalf of 512B,K representative 1kb,m representative of 1MThe following AA indicates the specified file prefixThe result: Aa_aa Aa_abMerge split files:# cat Aa_aa aa_ab > AARAR Splitting large files# apt-get Install rar# rar a-v2048m Aa.rar AAThe result: Aa.part1.rar A
Thinkphp can not realize the upload of RAR file, I hope you pointed out
thinkphp implementation file upload, RAR format can not be uploaded, Pdf,jpg,xls file upload
PHP Code
Public function upload () { if (!empty ($_files)) { echo ' OK '; Dump ($_files); If there is a file upload, upload the attachment $this->_upload (); }
>
Ubuntu12.04 by default, files in rar format cannot be compressed.
However, many of our commonly used files are stored in rar compression format. So
To better use Ubuntu, we need to add some plug-ins by ourselves.
First install unrar
Input in Shell
Apt-Get install unrar
Apt-Get install RAR this is the compression of the installation rarfile
Next, you can
Enable CentOS to automatically install rar and unrar with yum
Objective: To enable CentOS to automatically install rar and unrar with yum
System Environment: CentOS 7.0
The procedure is as follows:
1. edit the fileEdit the dag. repo file, or create a new dag. repo file.Vi/etc/yum. repos. d/dag. repo2. Add code to the fileThis file is an empty file here. Add the file to the file, and then: WqSave![Dag] n
When using CodeIgniter development file upload program, the default does not support RAR and zip compression package format, which is still to be perfected. But we can solve this problem by defining our own format.CodeIgniter restrictions on formatting when uploading files are defined in the mimes.php file in the Application Folder config. The file does not contain RAR by default, and the zip definition doe
Purpose: To enable CentOS to install RAR and Unrar automatically with YumSystem Environment: CentOS 7.0The following are the steps:1. Edit the fileEdit the Dag.repo file, or create a new Dag.repo file.vi /etc/yum.repos.d/dag.repo2. Add code to the fileThe file in my here is an empty file, add the next content, and then :wq Save![dag]name=DagRPMRepositoryforRedHatEnterpriseLinuxbaseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/daggpgcheck=1ena
ZhangchangchangIn order to obtain a compressed package of files, and the package may contain compressed packets, folders, folders containing compressed packets, files and other nested cases, the use of breadth-first traversal and depth-first traversal method to solve the problem.public static list{String destpath = zippath.substring (0,zippath.lastindexof (".")) + "/";Unzip the compressed file firstif (Zippath.contains (". zip"))Unzipfile (New File (Zippath), destpath);if (Zippath.contains (".
1, first of all, we choose RAR compressed file point attributes;
2, point attributes-Select comments-See the password is here, the general website download software to extract the password are in this;
3, the password copied to the Decompression password box, point confirmation can;
4, and, sometimes, decompression password are downloaded under the website software.
Second, alternative methods
Advancedrarrepair This software
In fact, want to achieve this function is very simple, first of all to upload a RAR decompression program, is RAR own decompression program, only need its coreProgram RAR.EXE this file is OK. Then you will upload a program that executes RAR.EXE CMD. EXE This is a program in Windows (don't need me to say it). Finally, we started to implement these procedures. Take a look at the following code
Dim Ylj,
The first use of Apple Mac computer Friends may not be familiar with all aspects of MAC computer operating system, including our most commonly used compression and decompression folder operation, today PC6 Apple Network Small series to bring you on Mac computer how to compress and decompress files and folders using tutorial.
1, if you need to process the file is not on the desktop, then you need to first click "Go"---> "Computer"
2. On the le
CodeIgniter restrictions on formatting when uploading a file are defined in the mimes.php file in config in the application folder. The file does not contain RAR by default, and the zip definition cannot upload a compressed package. We can solve this problem by adding the following code to the class:
Copy the code as follows: "zip" = = Array ("Application/x-zip", "Application/zip", "application/x-zip-compressed", " Application/octet-stream "),//orig
Calculate the PECL extension rar, and zip the dll file compiled by win. Ask for the PECL extension rar. the dll files under win compiled by zip are in urgent need of use. I cannot find one on the Internet, but I don't have the environment. I am a VC boss. Is there any ready-made network speed? Let me answer D's question about the PECL extension rar. the dll file
1. Download RAR 4.20 for Linux at http://www.rarlab.com/download.htm. 2. decompress and run the terminal to enter the decompressed directory. Run the command line: sudo make install 3. Create a soft link: sudo ln-S/usr/local/bin/RAR/usr/bin After that, Ubuntu's built-in archive manager can decompress the RAR compressed file. The Garbled text is success
first download winrar for linux:http://www.rarlab.com/download.htm at this URLAfter downloading the RAR folder extracted, in the terminal into the RAR folder,Run the Make command,Then you can unzip it.rar e Aa.rar The Aa.rar compressed files to the current directory, the AA file contains all the directories are not. rar x Aa.rar will extract the Aa.rar compresse
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.