Copy With Cp to Include Hidden Files
“How can I make cp -r
copy absolutely all of the files and directories in a directory\r\n\r\nRequirements:\r\n\r\n - Include hidden files and hidden directories.\r\n - Be one single command with an flag to include the above.\r\n - Not need to rely on pattern matching at all.\r\n\r\nMy ugly, but working, hack is:\r\n\r\n cp -r /etc/skel/* /home/user\r\n cp -r /etc/skel/.[^.]* /home/user\r\n\r\nHow can I do this all in one command without the pattern matching?\r\nWhat flag do I need to use?”
<a href=““https://superuser.com/questions/61611/how-to-copy-with-cp-to-include-hidden-files-and-hidden-directories-and-their-con"">— “eleven81”