Copy dot files on Linux

The following command can be used to copy dot files (i.e. configuration files starting with a dot, e.g. .bashrc) without copying all the dot directories:

find . -maxdepth 1 -name “.??*” -type f -exec cp -ia ‘{}’ /dest/path \;

Leave a Reply

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