Reduce Disk Space - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Reduce Disk Space

Description:

... already know compress can also shrink the file size, but usually ... gunzip can restore a file that has been shrunk with gzip or compress. gunzip filename.gz ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 8
Provided by: Kami47
Category:
Tags: disk | reduce | shrunk | space

less

Transcript and Presenter's Notes

Title: Reduce Disk Space


1
Reduce Disk Space
  • compress
  • gzip
  • tar

2
Shrink the file
  • gzip utility works particularly well on files
    with a lot of repeated information such as text
    and image data.
  • gzip filename
  • Gzip puts .gz to the end of filename
  • i.e filename.gz
  • -v (verbose) option causes gzip to report the
    amount of reducing of the file
  • Eg gzip v filename

3
compress
  • As you already know compress can also shrink the
    file size, but usually not as well as gzip.
  • Compress utility marks a file it has compressed
    by adding a .Z to its name.

4
To expand the files
  • gunzip can restore a file that has been shrunk
    with gzip or compress
  • gunzip filename.gz
  • zcat utility allows you to view a file that has
    been compressed with either gzip or compress.
  • gunzip c is identical to zcat

5
tar
  • Tar utility combines a group of files into a
    single file. The resulting file has a .tar
    extension.
  • The tar command does not compress files.
    Frequently, therefore a tar file is compressed
    with either gzip or compress, and create a file
    with .tar.gz or .tar.Z extension.

6
tar
  • To pack a list of files or the content of a
    directory
  • tar options file-name list-of-files (or
    Directory)
  • tar cvf tarname.tar Dirname
  • tar cvf tarname.tar filea fileb file
  • c to create a new archive
  • v to print berbose information list each file
    as it is archived
  • f to specify the file name you want the
    resulting tar archive be name. It should be the
    last option so as to be preceded by filename

7
To extract the tar
  • Now other people who receive our filename.tar
    can extract it.
  • tar xvf tarname.tar
  • This creates subdirectory tarname and places all
    the original files into it.
  • x extract files from an archive
  • By the way in front of options of tar command
    is optional. Tar also works without it. Tar
    xvf tarname.tar
Write a Comment
User Comments (0)
About PowerShow.com