Skip to content

u/severach

In this archive from Jan 2017 to Jul 2025

0
posts
400
comments
0
media
1.1k
score

Top comments

File locking has nothing to do with it.

Linux uses inode based file systems. Windows uses directory based file systems.

A file has a name, timestamp, size, and a start cluster on disk. Linux stores the name in the directory and the rest in an inode. Windows stores all in the directory. A name is required to open a file but once open a name is no longer needed. The file can be used forever with only the timestamp, size, and start cluster.

In Linux the inode continues to exist after the file name has been deleted. Because the inode continues, the file is fully read write accessible for as long as applications keep it open. The inode is destroyed when the last application closes it. This allows Linux to delete a file name and replace it with another file with the same name one without interfering with applications that are using the original.

In Linux, for a short time there are two versions of a file, the old copy that is no longer visible in the directory, used by applications that haven't closed it yet, and the new copy that just arrived.

Windows stores everything in the directory. The directory entry can't be removed and replaced with a new one with the same name until every application closes the file. Files held open by optional applications can be released by terminating the applications. Some files are held open by the operating system and the only way to release them is to terminate the operating system, aka reboot.

In Windows it is not possible to make a new file with the same name as the old file while leaving the old file intact for applications using it.

27 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.