Data Compression / Archival

From UMIACS
Revision as of 20:59, 4 November 2019 by Gstewar1 (talk | contribs) (Created page with "By compressing files before archiving them, the computer will be able to store the same information and data on less disk space, as well as reduce transmission time of the fil...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

By compressing files before archiving them, the computer will be able to store the same information and data on less disk space, as well as reduce transmission time of the file.

Compressed Archive Files For Linux

To Create Compressed Archive File

To create a compressed archive file, in terminal enter:

tar czvf <FILENAME>.tar.gz <DIRECTORY>

The command -c indicates the creation of a file, while the -z command specifies that a gzip (compressed) file is being created.

To List Contents of File

To list the contents of a gzip tar file without extracting the data, in the terminal enter:

tar tzvf <FILENAME>.tar.gz

The command -t indicates that you wish to look into the file without extraction.

To Expand Contents of File

To extract the contents of a gzip tar file, in the terminal enter:

tar xzvf <FILENAME>.tar.gz

The command -x indicates that you wish to expand the data from the file.

Compressed Archive Files For Windows

To Create Compressed Archive File

To create a compressed archive file, in the command prompt enter:

Compress-Archive -Path <FILE PATH> -DestinationPath <PATH OF COMPRESSED / ARCHIVED FILE>.zip

To create a compressed archived file from a folder, in the command prompt enter:

Compress-Archive -Path <FOLDER PATH> - DestinationPath <PATH OF COMPRESSED / ARCHIVED FILE>

Note, for creating a compressed archive file from a folder, do not write .zip at the end of the file.

To Expand Contents of File

To expand the contents of the compressed archive file, in the command prompt enter:

Expand-Archive -Path <FILE PATH>.zip -DestinationPath <FILE PATH OF UNZIPPED FILE>