Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

gunzip

Uncompress GNU zip files

Syntax

gunzip(files)
gunzip(files,outputdir)
gunzip(url, ...)
filenames = gunzip(...)

Description

gunzip(files) uncompresses GNU zip files from the list of files specified in files. Directories recursively gunzip all of their content. The output files have the same name, excluding the extension .gz, and are written to the same directory as the input files.

files is a character vector or cell array of character vectors containing a list of files or directories. Individual files that are on the MATLAB® path can be specified as partial path names. Otherwise, an individual file can be specified relative to the current directory or with an absolute path.

Folders must be specified relative to the current folder or with absolute paths. On UNIX® systems, folders can also start with ~/ or ~username/, which expands to the current user's home folder or the specified user's home folder, respectively. The wildcard character * can be used when specifying files or folders, except when relying on the MATLAB path to resolve a file name or partial path name.

gunzip(files,outputdir) writes the gunzipped file into the directory outputdir. If outputdir does not exist, MATLAB creates it.

gunzip(url, ...) extracts the GNU zip contents from an Internet universal resource locator (URL). The URL must include the protocol type (for example, 'http://'). MATLAB downloads the URL to the temp directory, and then deletes it.

filenames = gunzip(...) gunzips the files and returns the relative path names of the gunzipped files in filenames.

Examples

To gunzip all .gz files in the current directory, type:

gunzip('*.gz');

To gunzip Cleve Moler's "Numerical Computing with MATLAB" examples to the output directory ncm, type:

url ='http://www.mathworks.com/moler/ncm.tar.gz';
gunzip(url,'ncm')
untar('ncm/ncm.tar','ncm')

See Also

| | | |

Introduced before R2006a

Was this topic helpful?