GNU 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
Submitter: | Cédric Marie <cedric_marie> | ||
Submitted: | 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 |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
No changes have been made to this item
Powered by Savane 3.12.
Corresponding source code
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).