Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder with the following contents. I am wanting to change the symbolic link in a single atomic transaction without deleting it.

drwxr-xr-x 9 root root 4096 Apr 10 13:47 2012-03-19
drwxr-xr-x 9 root root 4096 Apr 10 13:44 2012-04-10
lrwxrwxrwx 1 root root   10 Mar 19 15:28 current -> 2012-03-19

I figured out at one time that the following would do it:

# ln -sf 2012-04-10 current

However, it doesn't take. Any help is greatly appreciated!

share|improve this question
atomic transaction on a file system?! – pfo Apr 10 '12 at 19:00
do an ls of current, I bet you will find your symbolic link there. – Zoredache Apr 10 '12 at 19:02
pfo: Sorry for using the wrong terminology. I've got a stronger database background and that was the best way I could think of to communicate my point quickly. I figured you would understand what I meant even if the terminology wasn't correct. Thanks! :) – FriendlyDev Apr 10 '12 at 19:08
up vote 5 down vote accepted

try the following

ln -sfn 2012-04-10 current

The reason

   -n, --no-dereference
          treat destination that is a symlink to a directory as if it were a normal file
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.