Re:Take care editing bash scripts (2019)
by rpra on Wednesday May 06, 2020 @05:30AM
(#23089232)
i dont see the behavior you describe after i edit file in vim the inode does not change (in linux)
[ Parent
| on HN ]
It depends on vim's 'writebackup' option. By default, it's on, but I guess you have it off. You can check in vim with ":set writebackup?" If it returns "writebackup", it's on; if it returns "nowritebackup", it's off.
EDIT: Then again, like the other comment mentioned, it seems it also depends on whether the file is in /tmp/. This seems to be because it matches the default pattern in the option "backupskip". For unix, the default is "/tmp/,$TMPDIR/,$TMP/,$TEMP/".
Re:Take care editing bash scripts (2019)
by photon-torpedo on Wednesday May 06, 2020 @05:42AM
(#23089285)
Thanks. Very curious. Indeed if the file is in /tmp, the inode doesn't change. But if it's in my home directory, it does change (for me). Both file systems are ext4, so there's something else at play.