[cs631apue] problem about hard link
Jan Schaumann
jschauma at stevens.edu
Wed Sep 19 21:38:56 EDT 2012
yluo4 <yluo4 at stevens.edu> wrote:
> I first type the command 'ln name1 name2', then 'emacs name2' to change
> the contents. when I 'more name1', the contents of name1 don't change.
What system is this on? What does 'ls -li' tell you about these two
files?
This is what you should see:
$ echo foo > name1
$ ln name1 name2
$ cat name2
foo
$ echo moo >> name2
$ cat name1
foo
moo
$ ls -li name[12]
1816478 -rw------- 2 jschauma professor 8 Sep 19 21:37 name1
1816478 -rw------- 2 jschauma professor 8 Sep 19 21:37 name2
$
This is on linux-lab.cs.stevens.edu.
-Jan
More information about the cs631apue
mailing list