tar on a directory mydir
will archive hidden files and hidden subdirectories, but tar from within mydir
with a *
wildcard will not. Is this a longstanding and known inconsistency or bug?
Edit (additional information): tar from within mydir
with a wildcard will not "see" nor archive hidden files and hidden subdirectories in the immediate directory. However, in the non-hidden subdirectories of mydir
hidden files and hidden subdirectories will be archived.
With wildcard it will not work. You have to specify . (current directory) if you mean full directory including hidden files. You can do
tar -cvpzf test.tgz .