Thursday, March 1, 2012

Changing a symbolic link in Linux

Symbolic links are great.

I need to swap out local Maven repositories for the project I'm working on.  I created a symbolic link, "maven_repo" in my home directory that points the current local Maven repo.  When it came time to change the "maven_repo" link I realized that changing a symbolic link to a directory requires an extra command :

ln -sfn DESTINATION_DIRECTORY LINK_NAME

It wasn't so obvious from the man page.  This blog post saved me a ton of time.

4 comments:

Unknown said...

Cool Thanks!

jeremyrdavis said...

Glad you liked it

joyap said...

thank you for your post. exactly what I needed today.

jeremyrdavis said...

Glad to be of assistance