Compress Tar without Parent Folder
Solution 1: cd into the folderUsing the earlier example, after you have narrowed down the directory, simply run the command. This is the simplest solution. But sometimes cd into any random directories may not be affordable.
Solution 2: use -C option in tar command: e.g. "tar -cJf [path to archive].tar.xz -C [path to files] [files]"
This command will disregard any parent folders you may have inadvertently added.