Andreas Schwab wrote:
> Bob Proulx writes:
> > I like this suggestion of yours.  I agree that the symlink value
> > cannot be a source of error.
> 
> It can, when it is too long.

Yes, you are correct.  The limit is 3976 characters on my system with
a reiserfs filesystem.  I ran the following script to test this.

  value=x
  while rm -f /tmp/symlinktest ; ln -s $value /tmp/symlinktest; do
      value=x$value
  done
  echo at $(printf $value | wc -c) characters

After about ten seconds it produced the following output, with 3967
'x' characters deleted and replaced with "..." so that it would not be
too much of a waste of bandwidth in this message.

  ln: creating symbolic link `/tmp/symlinktest' to `xxxxx...xxxxx': File name 
too long
  at 3977 characters

Bob


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to