How to copy hidden files on linux

Sometimes we need to copy a bunch of files from one directory to another on our *nix environment. 
We all know the cp command and use this in these situations. However often directories will contain hidden files or "dot files" such as .htaccess or .git.

To copy these files aswell we need to perform some matching:


This will copy the hidden files in most cases.

Add new comment