Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Why does cp -r .*/ _dotfiles/ copy all files and directories and not just hidden directories?
cp -r .*/ _dotfiles/
The glob pattern .* matches the current directory (.) and the parent directory (..).
cp -r .[^.]*/ _dotfiles
Required, but never shown