I am trying to take a directory and create an archive of it in my home directory from another location. I know that the -C option can be used for this, but tar seems to be ignoring it. I've tried $(basename $DEST)_$(date +%F_%H%M%S).tar.gz -C $HOME $(basename $DEST) where $DEST is the path to the directory I want to archive. Instead of creating the archive in my home directory, tar keeps creating it in the directory I'm executing it from. Is there anything wrong with the way I'm executing tar? Everything else seems to work properly, it's just that the -C flag is being completely ignored. I'm on Linux Mint 18.3 XFCE edition.
Edit: The full command is tar czf Pictures_$CREATION_TIMESTAMP.tar.gz -C /home/$USER Pictures. I was executing it from /home/$USER/coding/python_code/.