From the course: Linux: System Information and Directory Structure Tools (2017)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Compress files

Compress files - Linux Tutorial

From the course: Linux: System Information and Directory Structure Tools (2017)

Start my 1-month free trial

Compress files

- [Voiceover] When we're using tar to create archives, it's easy to pass a compressor to make the archives smaller. However, these compressors can be used separately as well. We might want to use a compressor without tar if we just want to make one file smaller and weren't concerned about the metadata, like file ownership, permissions or timestamps. Note that some compressors don't work well with recursive directories, so tar would be the best bet for that case. The first compressor we'll look at, is gzip. As we've seen in our previous video, to create a tar archive and call it "gzip," we just pass the "dash, dash, gzip" option through tar. To create a gzip archive without tar, we use it directly. Let's copy the "slash, etsy services" file to our current directory so we have something to compress. Type in "cp, slash, etc, slash, services, space, dot," and hit enter. The source file is "slash, etsy, slash, services," and the destination is just a single dot. The dot is a shortcut to…

Contents