Hacker News new | ask | show | jobs
by Boldewyn 3429 days ago
Looking for a specific line in the production server's /etc/password with this command:

sed -i -n '/foobar/p' /etc/passwd

trimmed the file to a single line's length. D'oh! Shouldn't have added that `-i`, should not have done that.

Luckily I could restore it from a (working) backup while still logged in. Phew!