How to copy all files including hidden ones on linux

I tried to copy all files using the cp under linux. Unfortunately in the usual case this is only copying the normal files. Things like .htaccess or .ssh directories are not being copied.

There is a simple solution for that. Just add the following line to the bash / shell you want to do the copy from.

shopt -s dotglob

This sets kind of a “global / all files”.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.