Skip to main content

You may be using a Web browser that does not support standards for accessibility and user interaction. Find out why you should upgrade your browser for a better experience of this and other standards-based sites...

Dartmouth Home  Search  Index

Dartmouth Home | Search | Index

Dartmouth home page
Computing at Dartmouth
Computing > Support >  Library >  Research > UNIX > Files >

Uncompressing a File

Uncompressing a file is a simple process, but it does depend on how the file was compressed.

Files that end in .Z have been compressed with the UNIX Compress command.

Files that end in .gz have been compressed with gunzip.

To uncompress a single file named data1 (this will create a file named data1.Z), use the command uncompress data1 or gunzip data1.

To uncompress all the files in a directory that have the string data in their name, use the command uncompress *data* or gunzip *data*.

To uncompress all the files in a sub-directory named old_data, use the command
find ./old_data -type f -exec uncompress {} \; or find ./old_data -type f -exec gunzip {} \;.

For information on how to compress a file, see Compressing a File.

Last Updated: 5/7/07