[Bug 367211] Re: sed -i destroys symlink

Aditya Gnaneshwar aditya.28041991 at gmail.com
Tue Oct 24 21:53:49 UTC 2017


can we have a similar option for a hard link file?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sed in Ubuntu.
https://bugs.launchpad.net/bugs/367211

Title:
  sed -i destroys symlink

Status in sed package in Ubuntu:
  Fix Released

Bug description:
  When using 'sed -i' on a symlink the symlink gets destroyed.
  Observe:

  % ls -l myfile symlink
  -rw-rw-r-- 1 miekg miekg 12 Apr 26 10:53 myfile
  lrwxrwxrwx 1 miekg miekg  6 Apr 26 10:53 symlink -> myfile

  # do an edit
  % sed -i 's/hello//' symlink

  % ls -l myfile symlink
  -rw-rw-r-- 1 miekg miekg 12 Apr 26 10:53 myfile
  -rw-rw-r-- 1 miekg miekg  7 Apr 26 10:54 symlink

  And gone is your symlink.

  This either a feature or a bug :)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sed/+bug/367211/+subscriptions



More information about the foundations-bugs mailing list