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 *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.