Re: ext2fs problem with rename() system call

Guest section DW (dwguest@win.tue.nl)
Sat, 9 Jan 1999 01:33:26 +0100 (MET)


From: Linus Torvalds <torvalds@transmeta.com>

> I guess GNU `ln -fb a b' and `cp -flb a b' are broken then. They fail if
> `b' and `b~' point to the same file, which is quite likely in these cases.
> `ln -f a b' and `cp -fl a b' are fine.

Note that the above POSIX text is only relevant for the _system_call_.

What POSIX.2 says about the behaviour of the "ln"/"cp" commands is another
issue. I agree with you that it would _seem_ like their behaviour is less
than desireable, but whether it is a bug is not clear.

LN(1) LN(1)

NAME
ln - make links between files

SYNOPSIS
ln [options] source [dest]
ln [options] source... directory

POSIX options: [-f]

GNU options (shortest form): [-bdfinsvF] [-S backup-suf
fix] [-V {numbered,existing,simple}] [--help] [--version]
[--]

...

In other words: -b is a GNU extension. There is no POSIX.2 requirement on -b.
The same holds for cp.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/