Você pode usar a opção -C
de tar
para realizar isso:
tar -C /home/username/dir1/dir2 -cvf temp.tar selecteddir
Na página do manual de tar
:
-C directory
In c and r mode, this changes the directory before adding the following files.
In x mode, change directories after opening the archive but before extracting
entries from the archive.