In order to compress a nested directory with tar without having to first change
into its parent directory, the -C
flag can be used:
$ tar -czvf compressed.tar.gz -C path/to/almost/ target_dir
In order to compress a nested directory with tar without having to first change
into its parent directory, the -C
flag can be used:
$ tar -czvf compressed.tar.gz -C path/to/almost/ target_dir