Why does cp -r .*/ _dotfiles/
copy all files and directories and not just hidden directories?
1 Answer
The glob pattern .*
matches the current directory (.
) and the parent directory (..
).
Try this:
cp -r .[^.]*/ _dotfiles
The glob pattern .*
matches the current directory (.
) and the parent directory (..
).
Try this:
cp -r .[^.]*/ _dotfiles