Help With Tar Execution
I am using the below tar execution, and it works fine. The question is that when I extract, I always get the full path. Is there a way to when extracting, that it only extracts the files and not include the full path to the files?
tar -cvjf backup/filename.tar.bz2 /home/virtual/domain.com/var/www/html/ > /dev/null 2>&1.
tar -xvjf filename.tar.bz2 -> extracts to html/
You'll be wanting to look at --strip-path or --strip-components depending on the version of tar you're using.
Thank you. That works for me.