helpGNU Core Utilities - Support: sr #107536, ln -sf with directory symlink

 
 

You are not allowed to post comments on this tracker with your current authentication level.

sr #107536: ln -sf with directory symlink

Submitted by:  Cédric Marie <cedric_marie>
Submitted on:  Thu 02 Dec 2010 09:49:43 AM UTC  
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux

Thu 02 Dec 2010 09:49:43 AM UTC, original submission:

In following sequence, I want to change a symlink with ln -sf.
I works fine with files, but not with directories.

$ ls -l
lrwxrwxrwx 1 cedric cedric 6 2010-11-24 14:15 mydir -> mydir1
drwxr-xr-x 2 cedric cedric 4096 2010-11-24 14:08 mydir1
drwxr-xr-x 2 cedric cedric 4096 2010-11-24 14:08 mydir2
$ ln -sf mydir2 mydir
$ ls -l
lrwxrwxrwx 1 cedric cedric 6 2010-11-24 14:15 mydir -> mydir1
drwxr-xr-x 2 cedric cedric 4096 2010-11-24 14:15 mydir1
drwxr-xr-x 2 cedric cedric 4096 2010-11-24 14:08 mydir2
$ ls -l mydir1
lrwxrwxrwx 1 cedric cedric 6 2010-11-24 14:15 mydir2 -> mydir2

The link is created in symlink target directory (mydir1).

Expected result:
$ ls -l
lrwxrwxrwx 1 cedric cedric 6 2010-11-24 14:15 mydir -> mydir2
drwxr-xr-x 2 cedric cedric 4096 2010-11-24 14:15 mydir1
drwxr-xr-x 2 cedric cedric 4096 2010-11-24 14:08 mydir2

Am I wrong?
With current behaviour, I have to delete symlink (rm mydir) before changing it (ln -s).

Cédric Marie <cedric_marie>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cedric_marie (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3