From f3342373cd99afbdd15617d4ed3b93f833520a70 Mon Sep 17 00:00:00 2001 From: ImmortalPC Date: Sat, 15 Feb 2014 19:46:46 +0100 Subject: [PATCH] [TAR] Add a new command in tar --- cheatsheets/tar | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cheatsheets/tar b/cheatsheets/tar index ea12125..efa615f 100644 --- a/cheatsheets/tar +++ b/cheatsheets/tar @@ -21,3 +21,6 @@ tar -cjvf /path/to/foo.tgz /path/to/foo/ # To list the content of an .bz2 archive: tar -jtvf /path/to/foo.tgz + +# To create a .gz archive and exclude all jpg,gif,... from the tgz +tar czvf /path/to/foo.tgz --exclude=\*.{jpg,gif,png,wmv,flv,tar.gz,zip} /path/to/foo/