3 ms·
> As far as I know Linux gives you mechanism to lock files and directories, so the compression program you used should have locked the directory by default unti
by cesarb 4y ago
> As far as I know Linux gives you mechanism to lock files and directories, so the compression program you used should have locked the directory by default until it was done or canceled.
File locking on Linux is advisory, it excludes other processes which try to lock the same region of the same file, but not operations other than locking. Mandatory locks were optional (required a mount option, see https://lwn.net/Articles/667210/ https://lwn.net/Articles/667210/ for details), and were removed in 5.15 (https://lwn.net/Articles/874493/ https://lwn.net/Articles/874493/).
- Bilal_io 4y agoThank you for the links. I did a bit of reading to learn a bit and my understanding of the advisory file locking is that it can be ignored by programs that don't respect it. Is it fair to say that the the shell or gui the user used should have respected the advisory lock? Of course that's assuming the compression program used does attempt to apply file lock, which may not be the case according to another comment.