tar with nested directories

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

source

View on Github