how to compress file in unix

Learn about how to compress file in unix, we have the largest and most updated how to compress file in unix information on alibabacloud.com

Java.util.zip Compress package File summary One: Compress files and folders below the file

First, briefZip is used to compress and decompress files. The classes used are: ZipEntry ZipoutputstreamSecond, the specific implementation of the CodePackage Com.joyplus.test;import Java.io.file;import java.io.fileinputstream;import Java.io.filenotfoundexception;import Java.io.fileoutputstream;import Java.io.ioexception;import Java.io.inputstream;import Java.util.arraylist;import Java.util.list;import Java.util.zip.zipentry;import Java.util.zip.ZipOu

C # Use ICSharpCode. SharpZipLib. dll to compress the file and decompress the file

(); Byte [] buffer = new byte [fs. Length];Fs. Read (buffer, 0, buffer. Length ); // ZipEntry entry = new ZipEntry (file); Path. GetFileName (file)String file = fi. FullName;File = file. Replace (cutStr ,""); ZipEntry entry = new ZipEntry (

Create a cab file (makecab) and compress it to a file with a high compression ratio.

Microsoft (r) cabinet maker-version 5.1.2600.2180 Copyright (c) Microsoft Corporation. All rights reserved .. Makecab [/V [N] [/d Var = value...] [/L dir] source [destination] Makecab [/V [N] [/d Var = value...]/F directive_file [...] Source file to compress. Destination File name to give compressed file. If

Use commons-compress to perform ZIP file compression and decompression)

Apache commons compress is a class library for compressing and decompressing files. You can operate files in Ar, cpio, Unix dump, tar, zip, Gzip, xz, pack200 and Bzip2 formats with powerful functions. Here, we will write two methods to compress files into ZIP files and decompress files from ZIP files using commons compres

Commons-compress operation zip file (compression and decompression)

Commons-compress: For more information about zip files (compression and decompression), see. Apache Commons Compress is a class library for compressing and decompressing files. You can operate files in ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200 and bzip2 formats with powerful functions. Here, we will write two methods to

Unzip the uploaded text file to compress the package and insert the extracted text file contents into the database

$content =file_get_contents ($_files["File" ["Tmp_name"]), $ret->content= $content; (file_exists ("/var/www/api/uploads//" .$_files["file"] ["name"]) {echo$_files["file"] [" Name "]." alreadyexists. ";} Else{move_uploaded_file ($_files["file"] ["Tmp_name"], "/var/www/api/uploads/" .$_files["

Gzip compressed file content increases web browsing speed (from: http://www.funnyapple.com/gzip-compress-for-improving-web-speed.html)

We can see the Yahoo homepage's rating in yslow. Today I will introduce how to implement "compress components with gzip. In fact, I personally think this is not what the page reconfigurator is doing, but it also serves as a small branch of front-end development. We also need to know about page restructures, during page reconstruction, be sure not to make your page bloated. A considerable number of programmers may not have taken this issue into conside

UNIX advanced environment programming (14) file IO, unix programming 14io

UNIX advanced environment programming (14) file IO, unix programming 14io Spring is coming. In addition to work and study, everyone must exercise and exercise more. Haidao, which was shot in haidao Huaxi, yuandu ruins park last weekend. Go to the topic. O_DIRECT and O_SYNC are flags that the system calls open. Open a file

Commons-compress operation zip file (compression and decompression)

Commons-compress: For more information about zip files (compression and decompression), see.Apache Commons Compress is a class library for compressing and decompressing files.You can operate files in ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200 and bzip2 formats with powerful functions.Here, we will write two methods to C

"Unix environment advanced programming" chapter 3rd-file I/O, unix environment Advanced Programming

"Unix environment advanced programming" chapter 3rd-file I/O, unix environment Advanced Programming1. Introduction For most Unix files, I/O only requires five functions: open, read, write, lseek, and close. The functions described in this chapter are often calledI/O without buffering. TermsWithout BufferingIt means

File compression and packaging in linux --- compress, gzip, zcat, bzip2, bzcat, tar, find, tarfile, tarball, --- compresszcat

File compression and packaging in linux --- compress, gzip, zcat, bzip2, bzcat, tar, find, tarfile, tarball, --- compresszcatCommon Linux compressed file extensions *. Z compress compressed files (replaced by gzip) *. Gz gzip compressed files *. Bz2 bzip2 compressed files (better than gzip, but only one

UNIX & Linux University Tutorial (iv): UNIX file system, process, and job control

Chapter 23rd UNIX File SystemNamed pipe Mkfifo:mkfifo [-M mode] pipe. Named pipes must be created explicitly and will not disappear (the RM command can be removed).The proc file is a pseudo-file used to access kernel information. For example, if a process ID is 1952, the process-related information can be found in a

"Unix&linux Size Tutorial" Learning Note 6--unix file system

1:unix file Type-3 typesNormal files (regular files): Text files (plain text, scripts, source programs, configuration files, HTML, etc.), binary files (multimedia files, databases, etc.)Directories: for organizing filesPseudo-file: does not store data for the purpose of providing a service. Divided into three kinds:Special files: Device drivers,

AIX file packaging and compression use of the tar gzip compress

Today in Aix with TAR-CVF backup, make a tar package, occupy the hard disk space is too large, no compression ratio, Try to use the TAR-ZCVF Linux system can use the-z command (z with gzip to compress/extract the file, plus this option to compress the archive file, but the restore must also use this option for decompr

[UNIX] the generation of an executable file to the distribution (on) of processes in the memory/the generation of executable files, unix executable files

[UNIX] the generation of an executable file to the distribution (on) of processes in the memory/the generation of executable files, unix executable files From the generation of an executable file to the distribution of processes in the memory (on) Generation of executable files To generate executable files for a source

Use php zlib to compress and decompress swf file _ PHP Tutorial

Use php zlib to compress and decompress the swf file. The following example shows how to compress and compress a swf File. if the swf file is not compressed, the first byte of the file

UNIX File system How to install PhP3 under UNIX system

# CD/USR/SRC # tar Xvzf apache_1.3.6.tar.gz (Generate apache_1.3.6 directory) # tar Xvzf php-3.0.8.tar.gz (Generate php-3.0.8 directory) # CD apache_1.3.6 #./configure--prefix=/usr/local/apache (Set the Apache installation directory to/usr/local/apache) # CD php-3.0.8 #./configure--with-mysql=/usr/local/mysql \ --with-apache=. /apache_1.3.6 \ --enable-track-vars (configuration support MySQL, as Apache function module, tracking variable valid) # make; Make install In the Configure parameter above

File compression and packaging in linux --- compress, gzip, zcat, bzip2, bzcat, tar, find, tarfile, tarball

File compression and packaging in linux --- compress, gzip, zcat, bzip2, bzcat, tar, find, tarfile, tarballCommon Linux compressed file extensions *. Z compress compressed files (replaced by gzip) *. Gz gzip compressed files *. Bz2 bzip2 compressed files (better than gzip, but only one

Exclude a folder or file when using the tar command to compress

/proftpd/proftpd.log log tar command 1. Action The TAR command is a reliable method of backing up files in a unix/linux system and can work almost anywhere, with permissions for all users. 2. Format tar [main options + auxiliary options] File or directory eg: tar zxvf libiconv-1.13.tar.gz ./libiconv tar cxvf libic onv-1.13.tar.gz./*.php 3. Main parameters When you use this command, the m

File compression and Packaging---compress,gzip,zcat,bzip2,bzcat,tar,find,tarfile,tarball under Linux

Common Linux Compressed file extensions*. Z Compress compressed files (has been replaced by gzip)*.gz gzip Program Compressed files*.BZ2 BZIP2 Program Compressed files (better than gzip, but only for one file to compress)*.tar Tar program packaged data, no compression (using tar to package a

Total Pages: 9 1 2 3 4 5 .... 9 Go to: Go

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.