I've got two directories, 1998-10-10 and 1998-10-09, like this:
omni:root> ls -lR
total 2
drwxr-xr-x 2 root users 512 Aug 10 15:33 1998-10-09
drwxr-xr-x 2 root users 512 Aug 10 15:35 1998-10-10
lrwxrwxrwx 1 root users 10 Aug 10 15:39 current -> 1998-10-09
./1998-10-09:
total 0
./1998-10-10:
total 0
omni:root>
I want a cron job to relink current to the 'next' directory, ie 1998-10-10
in example. So I type;
omni:root> ln -fs 1998-10-10 current
then get;
omni:root> ls -lR
total 2
drwxr-xr-x 2 root users 512 Aug 10 15:42 1998-10-09
drwxr-xr-x 2 root users 512 Aug 10 15:35 1998-10-10
lrwxrwxrwx 1 root users 10 Aug 10 15:39 current -> 1998-10-09
./1998-10-09:
total 0
lrwxrwxrwx 1 root users 10 Aug 10 15:42 1998-10-10 -> 1998-10-10
./1998-10-10:
total 0
omni:root>
The man page for ln says about -f;
FLAGS
-f Forces the removal of existing target path names before linking.
but this is not happening. However, something else is, this is the
creation of a link under dir. 1998-10-09, to itself.
I'm confused here. I guess I'm not RTFM'ing properly, but I can't see
whats happening.
Bob
Received on Mon Aug 10 1998 - 14:54:49 NZST