How to copy with cp to include hidden files and hidden directories and their contents?

### Case 1 (Note that /home/user must not exist already, or else it will create /home/user/skel.) Don't specify the files: ``` cp -r /etc/skel /home/user ``` ### Case 2 Lets say you created the new folder (or are going to create one) and want to copy the files to it after the folder is created ``` mkdir /home/ ``` ``` cp -r /etc/skel/. /home/ ``` ### Case 3 ``` mv /source/path/{.[!.],}* /destination/path ``` Source --- * [https://superuser.com/questions/61611/how-to-copy-with-cp-to-include-hi…](https://superuser.com/questions/61611/how-to-copy-with-cp-to-include-hi…) * [https://stackoverflow.com/questions/20192070/how-to-move-all-files-incl…](https://stackoverflow.com/questions/20192070/how-to-move-all-files-incl…)
Etiquetas