From bb264b81b2a77998380a1eb1f0a9442d2c53b1f3 Mon Sep 17 00:00:00 2001 From: Paul S Date: Tue, 25 Feb 2020 19:04:41 +0000 Subject: [PATCH] tar: add a relative paths example (#3867) Co-authored-by: Starbeamrainbowlabs --- pages/common/tar.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/tar.md b/pages/common/tar.md index d141430ae..069dbc048 100644 --- a/pages/common/tar.md +++ b/pages/common/tar.md @@ -12,6 +12,10 @@ `tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}` +- Create a gzipped archive from a directory using relative paths: + +`tar czf {{target.tar.gz}} -C {{path/to/directory}} .` + - Extract a (compressed) archive into the current directory: `tar xf {{source.tar[.gz|.bz2|.xz]}}`