I need to create a tarball of a given directory. However, I need to make sure hidden files are included too (such as those beginning with .).Will the following command automatically take the hidden files into account?tar -cvzf packed.tar.gz mydirIf not, how can I make sure I include hidden files?
Will tar -cvzf packed.tar.gz mydir take hidden files into account?
directory;tar;gzip
Yes, it will.Files starting with . are not hidden in all contexts.  They aren't expanded by *, and ls doesn't list them by default, but tar doesn't care about the leading ..  (find doesn't care either.)(Of course, this is one of those things that's easy to find out by experiment.)