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

 
 

You are not allowed to post comments on this tracker with your current authentification 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: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating 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
  • -unavailable- added by cedric_marie (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup