Bulk create symbolic links to directories

Since you can’t use the cp command to create links to directories, I found another site with a great use of the find command:

find path_to_the_directories_you_want_to_link_to -type f -exec ln -s \{\} . \;

This should create a symbolic link for each of the directories it finds in the path provided. Brilliant!

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s