tar cvf /var/lib/backup/sample.tar /home/user/.project
However, when I extract, I get its parents as well
/backup/ - /home/ - /user/ - .project/
This tar commands does it job because it doesn't include anything else in its parents (other folders under
user for example).
I want to do this programmatically, so changing the current working directory into
/home/user/ is not really an option.
Is it possible to do that?