From the course: Linux: System Information and Directory Structure Tools

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Compressing files

Compressing files

- [Instructor] When you're using tar to create archives, it's easy to pass a compressor to make the archive smaller. However, these compressors can be used individually as well. You might want to use a compressor without tar if you just want to make a file smaller and you were not concerned about metadata, like file ownership, permissions or timestamps. Know that some compressors don't work well with recursive directories, so tar would be the best tool in that situation. The first compressor I'll talk about is gzip. To create a gzip compressed tar archive just past the dash dash gzip option. To create a gzip file without tar, use it directly. Let's copy the Etsy services file to our current directory so we have something to compress. Type in cp space slash etc slash services space dot. The source file is Etsy services and the destination is just a single dot. The dot is a shortcut for the current directory we're in. Now…

Contents