Create a symlink for all hidden files excluding the hidden directories
I want to put all my configuration files in my home directory into version control. I only want the hidden files, not the hidden directories which create binaries and what not.
Using this one liner I can create a symbolic link for every hidden file from my home directory to my working (target) directory.
for f in .*; do if [[ -f $f ]]; then ln -s /home/user/$f /home/user/working/directory/$f; fi; done
I execute this command in the source directory.
Written by Clarice Billowes
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#