r7347 - in trunk/BOOK: . introduction/welcome postlfs/editors
Ag. D. Hatzimanikas
a.hatzim at gmail.com
Wed Apr 9 08:28:41 PDT 2008
On Tue, Apr 08, at 02:32 Randy McMurchy wrote:
> ag at linuxfromscratch.org wrote these words on 04/05/08 02:19 CST:
> > Author: ag
> > Date: 2008-04-05 01:19:38 -0600 (Sat, 05 Apr 2008)
> > New Revision: 7347
> > Modified:
> > trunk/BOOK/general.ent
> > trunk/BOOK/introduction/welcome/changelog.xml
> > trunk/BOOK/postlfs/editors/ed.xml
> > Log:
> > Replaced with symlinks the hard links to red and its man page
> Why was this done?
> I'm not really in favor of changing author's code unless there is
> really a reason to do it (makes something better, or fixes a problem).
I am not either, but this seems a case for an unnecessary hard link
(unless I am missing something obvious, so feel free to be pedantic).
We are just talking here about:
a. The same man page (ed.1), which is hard-linked to red.1 for unknown
b. The same executable (ed), which is hard-linked to red (for me for
But lets examine the latter and test if red works the way it have to, by
just create a symbolic link from ed to red. The man page is out of
question, it hasn't to be a hard-link.
/usr/bin/red: symbolic link to `ed'
[ag](~t)ed test.txt -s <<< $'i\nThis is\na test\n.\n,p\n,w'
[ag](~t)red test.txt -s <<< $'$a\nThis is \nanother test\nfor red\n.\n,p\n,w'
[ag](~t)mkdir test && mv -v test.txt test
`test.txt' -> `test/test.txt'
[ag](~t)red test/test.txt -s <<< $'$a\nLets test if it \nworks\n.\n,p\n,w'
So it works the way it is supposed to work (by denying to edit the file),
because that file is in a different directory than $(pwd), as red is a
It just works that way, when you just invoke it as red.
This is the same case with rvim/rview/gvim and many other applications, see:
lrwxrwxrwx 1 root root 3 2008-02-20 21:26 /usr/bin/rview -> vim*
lrwxrwxrwx 1 root root 3 2008-02-20 21:26 /usr/bin/rvim -> vim*
Finally, I've had a look what other distributions do, and they all do
I hope I covered the case, as it seemed to me so obvious when I fixed it,
that it didn't deserve a discussion or a ticket.
More information about the blfs-book