bash - How do I selectively create symbolic links to specific files in another directory in LINUX? -
i'm not sure how go doing this, need create symbolic links files in 1 directory , place symbolic links in directory.
for instance, want link files word "foo" in name in current directory bar1 not have extension ".cc" , place symbolic links in directory bar2.
i wondering if there single line command accomplish in linux bash.
assuming in directory contains directories bar1 , bar2:
find bar1 -name '*foo*' -not -type d -not -name '*.cc' -exec ln -s $pwd/'{}' bar2/ \;
Comments
Post a Comment