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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -