[cs631apue] problem about hard link
Jan Schaumann
jschauma at stevens.edu
Thu Sep 20 14:25:20 EDT 2012
yluo4 <yluo4 at stevens.edu> wrote:
> Thanks! I think it's the editor-emacs that cause the problem,
> because when I use the command 'echo >>' to change the contents of
> name1, the two will change. But when I use 'emacs' to change the
> contents of name1, name2 doesn't change.
Are you sure you are writing your changes to the file? Just opening a
file in emacs (or any other editor) wouldn't cause your changes to be
written to the file.
echo moo > file1
ln file1 file2
emacs file2
[edit]
C-x C-s # actually write and exit
cat file2
-Jan
More information about the cs631apue
mailing list