Linked Questions
12 questions linked to/from Why does inode value change when we edit in "vi" editor?
2
votes
0
answers
108
views
VI editor changes and does not change inodes of files when editing files under /tmp [duplicate]
I noticed that my vi editor changes inodes when editing files, except when that file is under /tmp. Why is this?
39
votes
4
answers
11k
views
How do I prevent sed -i from destroying symlinks?
Why does sed -i executed on symlink destroys that link and replaces it with destination file? How to avoid this?
eg.
$ ls -l pet*
-rw-rw-r-- 1 madneon madneon 4 mar 23 16:46 pet
lrwxrwxrwx 1 madneon ...
11
votes
1
answer
10k
views
Editing a file with several hard links
Let's say I have two hard links pointing at the same picture.
/photography/picture_1.jpg
/best_pictures/picture_1.jpg
What happens if I edit /photography/picture_1.jpg? Is the hard link broken and ...
11
votes
1
answer
2k
views
Should `sudo less ...` change the ownership of `~/.lesshst`?
Having performed a
sudo less ...
... in order to view a restricted log-file and doing some searches with it, I found the ownership and group of my ~/.lesshst file changed to root:root (where ~ ...
8
votes
1
answer
9k
views
single bind mounted file gets out of sync in linux
I am bind mounting a single file on top of another one and after making changes with an editor, I don't see the modifications in both files. However, if I make the changes with the shell using ...
3
votes
2
answers
3k
views
How do inode numbers from ls -i relate to inodes on disk
I'm trying to understand how inode numbers (as displayed by ls -i) work with ext4 partitions.
I'm trying to understand whether they are a construct of the linux kernel and mapped to inodes on disk, ...
4
votes
2
answers
3k
views
File permissions and saving
Let's say you open a file on which you have write permission.
Meanwhile you change permissions and remove write permission while you still have the file open in some editor.
What will happen if you ...
3
votes
3
answers
759
views
Why didn't inode change anymore with a hard link
I use Vim 8.2 to edit my files in my Ubuntu 18.04. When I open a file, do some changes and quit with Vim, the inode number of this file will be changed.
As my understanding, it's because the backup ...
0
votes
1
answer
419
views
Can I add files to the folder which is being zipped?
Let's say I have a python script which generates some file file_i.yo in folder folder ever second. After a while I decided that I have to zip the current state of folder and send it somewhere. Thus I ...
0
votes
1
answer
360
views
Vi editor message - input encoding conversion not supported
I'm currently using FreeBSD10, when i open a file using vi then a message displays at the end of file- "Input encoding conversion not supported".
Is this to warning or error ?
Note:- However the file ...
1
vote
2
answers
615
views
How to reliably maintain watches on edited files with inotify?
I'd like to monitor a file with inotify, and trigger some code when someone changes the content (IN_MODIFY or IN_CLOSE_WRITE), but I'm running into problems where inotify stops returning events when ...
0
votes
2
answers
108
views
Sed: what is the difference between -i and > file?
I know that > file is not sed specific, and that it writes stdout to the file, but how does this compare to sed's -i option? I read the man page, and I do not understand what in-place means. Are ...