FreeBSD Fortune on Nostr: When you've made modifications to a file in vi(1) and then find that you can't write ...
When you've made modifications to a file in vi(1) and then find that
you can't write it, type ``<ESC>!rm -f %'' then ``:w!'' to force the
write
This won't work if you don't have write permissions to the directory
and probably won't be suitable if you're editing through a symbolic link.
If you have sudo(8) installed and permissions to use it, type
``<ESC>w ! sudo tee %'' to force a write.
Published at
2024-01-07 18:00:05Event JSON
{
"id": "42548c7e40de874413243920dde198225e57ac3ae5e381037648e7d5ec14ec21",
"pubkey": "49792b0c3e803bb97f4005f83a8d6c09a58c6ea7f04e1ab19d149f9fabbbcee3",
"created_at": 1704650405,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.bsd.cafe/users/fbfortune/statuses/111715968968096515",
"activitypub"
]
],
"content": "When you've made modifications to a file in vi(1) and then find that\nyou can't write it, type ``\u003cESC\u003e!rm -f %'' then ``:w!'' to force the\nwrite\n\nThis won't work if you don't have write permissions to the directory\nand probably won't be suitable if you're editing through a symbolic link.\n\nIf you have sudo(8) installed and permissions to use it, type \n``\u003cESC\u003ew ! sudo tee %'' to force a write.",
"sig": "b62808429ad12860b59b6394d1fd97c637db4b1313ea77c506046f8c49529880b8c99230d96dbb6f0c52db5530f93a7a1280339518fc71869fb8f08d5216adbc"
}