Symlinks doesn't change its timestamp when editing file
up vote
0
down vote
favorite
When I have a file a.txt
and do ln -s a.txt b.txt
, then I edit a.txt
, a.txt
's timestamp changed. But when I edit b.txt
, b.txt
doesn't change its timestamp. Only a.txt
is changed. Why didn't b.txt
's timestamp change. And a.txt
's does.
Example:
$ ls -la
total 8
drwxr-xr-x 2 admin admin 4096 nov 5 16:53 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
$ nano a.txt
$ ln -s a.txt b.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:54 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 4 nov 5 16:54 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
$ echo wait a minute
wait a minute
$ nano b.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:56 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 9 nov 5 16:56 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
$ echo wait a minute again
wait a minute again
$ nano a.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:58 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 13 nov 5 16:58 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Look at this lines first:
-rw-r--r-- 1 admin admin 4 nov 5 16:54 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Then look at this, only a.txt's date changed when I edited b.txt
-rw-r--r-- 1 admin admin 9 nov 5 16:56 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Okay I know that b.txt is a symlink to a.txt. So you edit a.txt.
But WHY didn't my OS change the date ONLY for a.txt. When I edit b.txt. It is much more useful to also change the date of b.txt.
But then you also can say that directory's won't change its date when I file is edited in the directory (i edited a file, and i used the directory). The directory is used to edit the file in it. But the os does change the directory date when i edit a file in it
linux ubuntu filesystems
add a comment |
up vote
0
down vote
favorite
When I have a file a.txt
and do ln -s a.txt b.txt
, then I edit a.txt
, a.txt
's timestamp changed. But when I edit b.txt
, b.txt
doesn't change its timestamp. Only a.txt
is changed. Why didn't b.txt
's timestamp change. And a.txt
's does.
Example:
$ ls -la
total 8
drwxr-xr-x 2 admin admin 4096 nov 5 16:53 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
$ nano a.txt
$ ln -s a.txt b.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:54 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 4 nov 5 16:54 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
$ echo wait a minute
wait a minute
$ nano b.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:56 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 9 nov 5 16:56 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
$ echo wait a minute again
wait a minute again
$ nano a.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:58 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 13 nov 5 16:58 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Look at this lines first:
-rw-r--r-- 1 admin admin 4 nov 5 16:54 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Then look at this, only a.txt's date changed when I edited b.txt
-rw-r--r-- 1 admin admin 9 nov 5 16:56 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Okay I know that b.txt is a symlink to a.txt. So you edit a.txt.
But WHY didn't my OS change the date ONLY for a.txt. When I edit b.txt. It is much more useful to also change the date of b.txt.
But then you also can say that directory's won't change its date when I file is edited in the directory (i edited a file, and i used the directory). The directory is used to edit the file in it. But the os does change the directory date when i edit a file in it
linux ubuntu filesystems
1
Becauseb.txt
did NOT change. None of its contituents was modified, only its target.
– RudiC
Nov 5 at 16:07
Okay, but the directory is not changed (no files added or removed). Only edited a file in the directory. Why does the date of the directory change? The state of the directory is not changed (files, meta etc).
– SmileDeveloper
Nov 5 at 16:13
@SmileDeveloper that is a new question, but I will answer it anyway. Because it did change.a.txt
was removed and replaced with a file calleda.txt
.
– ctrl-alt-delor
Nov 5 at 16:18
OS systems does only edit the data on the disk that points toa.txt
's data. Only that is edited. Or is the WHOLE file copied to the memory, file removed and recreated. So when I have a disk file of 4 GB I need to wait before the file is in memory, can be removed, and then can be recreated. That is what you are saying in 'a.txt is removed and replaced'.
– SmileDeveloper
Nov 5 at 16:20
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
When I have a file a.txt
and do ln -s a.txt b.txt
, then I edit a.txt
, a.txt
's timestamp changed. But when I edit b.txt
, b.txt
doesn't change its timestamp. Only a.txt
is changed. Why didn't b.txt
's timestamp change. And a.txt
's does.
Example:
$ ls -la
total 8
drwxr-xr-x 2 admin admin 4096 nov 5 16:53 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
$ nano a.txt
$ ln -s a.txt b.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:54 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 4 nov 5 16:54 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
$ echo wait a minute
wait a minute
$ nano b.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:56 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 9 nov 5 16:56 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
$ echo wait a minute again
wait a minute again
$ nano a.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:58 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 13 nov 5 16:58 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Look at this lines first:
-rw-r--r-- 1 admin admin 4 nov 5 16:54 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Then look at this, only a.txt's date changed when I edited b.txt
-rw-r--r-- 1 admin admin 9 nov 5 16:56 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Okay I know that b.txt is a symlink to a.txt. So you edit a.txt.
But WHY didn't my OS change the date ONLY for a.txt. When I edit b.txt. It is much more useful to also change the date of b.txt.
But then you also can say that directory's won't change its date when I file is edited in the directory (i edited a file, and i used the directory). The directory is used to edit the file in it. But the os does change the directory date when i edit a file in it
linux ubuntu filesystems
When I have a file a.txt
and do ln -s a.txt b.txt
, then I edit a.txt
, a.txt
's timestamp changed. But when I edit b.txt
, b.txt
doesn't change its timestamp. Only a.txt
is changed. Why didn't b.txt
's timestamp change. And a.txt
's does.
Example:
$ ls -la
total 8
drwxr-xr-x 2 admin admin 4096 nov 5 16:53 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
$ nano a.txt
$ ln -s a.txt b.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:54 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 4 nov 5 16:54 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
$ echo wait a minute
wait a minute
$ nano b.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:56 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 9 nov 5 16:56 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
$ echo wait a minute again
wait a minute again
$ nano a.txt
$ ls -la
total 12
drwxr-xr-x 2 admin admin 4096 nov 5 16:58 .
drwxr-x--- 37 admin admin 4096 nov 5 16:53 ..
-rw-r--r-- 1 admin admin 13 nov 5 16:58 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Look at this lines first:
-rw-r--r-- 1 admin admin 4 nov 5 16:54 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Then look at this, only a.txt's date changed when I edited b.txt
-rw-r--r-- 1 admin admin 9 nov 5 16:56 a.txt
lrwxrwxrwx 1 admin admin 5 nov 5 16:54 b.txt -> a.txt
Okay I know that b.txt is a symlink to a.txt. So you edit a.txt.
But WHY didn't my OS change the date ONLY for a.txt. When I edit b.txt. It is much more useful to also change the date of b.txt.
But then you also can say that directory's won't change its date when I file is edited in the directory (i edited a file, and i used the directory). The directory is used to edit the file in it. But the os does change the directory date when i edit a file in it
linux ubuntu filesystems
linux ubuntu filesystems
edited Nov 5 at 16:11
asked Nov 5 at 16:04
SmileDeveloper
113
113
1
Becauseb.txt
did NOT change. None of its contituents was modified, only its target.
– RudiC
Nov 5 at 16:07
Okay, but the directory is not changed (no files added or removed). Only edited a file in the directory. Why does the date of the directory change? The state of the directory is not changed (files, meta etc).
– SmileDeveloper
Nov 5 at 16:13
@SmileDeveloper that is a new question, but I will answer it anyway. Because it did change.a.txt
was removed and replaced with a file calleda.txt
.
– ctrl-alt-delor
Nov 5 at 16:18
OS systems does only edit the data on the disk that points toa.txt
's data. Only that is edited. Or is the WHOLE file copied to the memory, file removed and recreated. So when I have a disk file of 4 GB I need to wait before the file is in memory, can be removed, and then can be recreated. That is what you are saying in 'a.txt is removed and replaced'.
– SmileDeveloper
Nov 5 at 16:20
add a comment |
1
Becauseb.txt
did NOT change. None of its contituents was modified, only its target.
– RudiC
Nov 5 at 16:07
Okay, but the directory is not changed (no files added or removed). Only edited a file in the directory. Why does the date of the directory change? The state of the directory is not changed (files, meta etc).
– SmileDeveloper
Nov 5 at 16:13
@SmileDeveloper that is a new question, but I will answer it anyway. Because it did change.a.txt
was removed and replaced with a file calleda.txt
.
– ctrl-alt-delor
Nov 5 at 16:18
OS systems does only edit the data on the disk that points toa.txt
's data. Only that is edited. Or is the WHOLE file copied to the memory, file removed and recreated. So when I have a disk file of 4 GB I need to wait before the file is in memory, can be removed, and then can be recreated. That is what you are saying in 'a.txt is removed and replaced'.
– SmileDeveloper
Nov 5 at 16:20
1
1
Because
b.txt
did NOT change. None of its contituents was modified, only its target.– RudiC
Nov 5 at 16:07
Because
b.txt
did NOT change. None of its contituents was modified, only its target.– RudiC
Nov 5 at 16:07
Okay, but the directory is not changed (no files added or removed). Only edited a file in the directory. Why does the date of the directory change? The state of the directory is not changed (files, meta etc).
– SmileDeveloper
Nov 5 at 16:13
Okay, but the directory is not changed (no files added or removed). Only edited a file in the directory. Why does the date of the directory change? The state of the directory is not changed (files, meta etc).
– SmileDeveloper
Nov 5 at 16:13
@SmileDeveloper that is a new question, but I will answer it anyway. Because it did change.
a.txt
was removed and replaced with a file called a.txt
.– ctrl-alt-delor
Nov 5 at 16:18
@SmileDeveloper that is a new question, but I will answer it anyway. Because it did change.
a.txt
was removed and replaced with a file called a.txt
.– ctrl-alt-delor
Nov 5 at 16:18
OS systems does only edit the data on the disk that points to
a.txt
's data. Only that is edited. Or is the WHOLE file copied to the memory, file removed and recreated. So when I have a disk file of 4 GB I need to wait before the file is in memory, can be removed, and then can be recreated. That is what you are saying in 'a.txt is removed and replaced'.– SmileDeveloper
Nov 5 at 16:20
OS systems does only edit the data on the disk that points to
a.txt
's data. Only that is edited. Or is the WHOLE file copied to the memory, file removed and recreated. So when I have a disk file of 4 GB I need to wait before the file is in memory, can be removed, and then can be recreated. That is what you are saying in 'a.txt is removed and replaced'.– SmileDeveloper
Nov 5 at 16:20
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
Because when you ask to edit b.txt
you edit a.txt
, the link is unaltered: Traversing the link does not change it.
Trying to access a link accesses the file that it points to (or the eventual file that is pointed to, the link may point to a link that points to a link that eventually point to a file/directory/something-else). Links are only access by using special link access routines. In addition soft-links can not be edited (only created and removed).
add a comment |
up vote
0
down vote
accepted
The answer:
When you open a symlink to a file, you exactly did open the symlink, read the text in the symlink (the link) out, close it and opens the file where it links to. So that means when you edit it. You never edited the symlink file.
Directory's contains another directorys or pointers to file like so:
This is the data on the beginning of the disk.
A 16:44:
-- B 17:18:
-- C 3kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
When you edit a file in a DIRECTORY. the filesize is changed, the date is changed (and more attributes). And that is changed in the directory information. So you also edited the directory data (size, date...). And so is the directory changed.
Result:
This is the data on the beginning of the disk after editing C.
A 18:20:
-- B 18:20:
-- C 8kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479935%2fsymlinks-doesnt-change-its-timestamp-when-editing-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Because when you ask to edit b.txt
you edit a.txt
, the link is unaltered: Traversing the link does not change it.
Trying to access a link accesses the file that it points to (or the eventual file that is pointed to, the link may point to a link that points to a link that eventually point to a file/directory/something-else). Links are only access by using special link access routines. In addition soft-links can not be edited (only created and removed).
add a comment |
up vote
2
down vote
Because when you ask to edit b.txt
you edit a.txt
, the link is unaltered: Traversing the link does not change it.
Trying to access a link accesses the file that it points to (or the eventual file that is pointed to, the link may point to a link that points to a link that eventually point to a file/directory/something-else). Links are only access by using special link access routines. In addition soft-links can not be edited (only created and removed).
add a comment |
up vote
2
down vote
up vote
2
down vote
Because when you ask to edit b.txt
you edit a.txt
, the link is unaltered: Traversing the link does not change it.
Trying to access a link accesses the file that it points to (or the eventual file that is pointed to, the link may point to a link that points to a link that eventually point to a file/directory/something-else). Links are only access by using special link access routines. In addition soft-links can not be edited (only created and removed).
Because when you ask to edit b.txt
you edit a.txt
, the link is unaltered: Traversing the link does not change it.
Trying to access a link accesses the file that it points to (or the eventual file that is pointed to, the link may point to a link that points to a link that eventually point to a file/directory/something-else). Links are only access by using special link access routines. In addition soft-links can not be edited (only created and removed).
answered Nov 5 at 16:16
ctrl-alt-delor
10.5k41955
10.5k41955
add a comment |
add a comment |
up vote
0
down vote
accepted
The answer:
When you open a symlink to a file, you exactly did open the symlink, read the text in the symlink (the link) out, close it and opens the file where it links to. So that means when you edit it. You never edited the symlink file.
Directory's contains another directorys or pointers to file like so:
This is the data on the beginning of the disk.
A 16:44:
-- B 17:18:
-- C 3kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
When you edit a file in a DIRECTORY. the filesize is changed, the date is changed (and more attributes). And that is changed in the directory information. So you also edited the directory data (size, date...). And so is the directory changed.
Result:
This is the data on the beginning of the disk after editing C.
A 18:20:
-- B 18:20:
-- C 8kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
add a comment |
up vote
0
down vote
accepted
The answer:
When you open a symlink to a file, you exactly did open the symlink, read the text in the symlink (the link) out, close it and opens the file where it links to. So that means when you edit it. You never edited the symlink file.
Directory's contains another directorys or pointers to file like so:
This is the data on the beginning of the disk.
A 16:44:
-- B 17:18:
-- C 3kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
When you edit a file in a DIRECTORY. the filesize is changed, the date is changed (and more attributes). And that is changed in the directory information. So you also edited the directory data (size, date...). And so is the directory changed.
Result:
This is the data on the beginning of the disk after editing C.
A 18:20:
-- B 18:20:
-- C 8kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
The answer:
When you open a symlink to a file, you exactly did open the symlink, read the text in the symlink (the link) out, close it and opens the file where it links to. So that means when you edit it. You never edited the symlink file.
Directory's contains another directorys or pointers to file like so:
This is the data on the beginning of the disk.
A 16:44:
-- B 17:18:
-- C 3kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
When you edit a file in a DIRECTORY. the filesize is changed, the date is changed (and more attributes). And that is changed in the directory information. So you also edited the directory data (size, date...). And so is the directory changed.
Result:
This is the data on the beginning of the disk after editing C.
A 18:20:
-- B 18:20:
-- C 8kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
The answer:
When you open a symlink to a file, you exactly did open the symlink, read the text in the symlink (the link) out, close it and opens the file where it links to. So that means when you edit it. You never edited the symlink file.
Directory's contains another directorys or pointers to file like so:
This is the data on the beginning of the disk.
A 16:44:
-- B 17:18:
-- C 3kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
When you edit a file in a DIRECTORY. the filesize is changed, the date is changed (and more attributes). And that is changed in the directory information. So you also edited the directory data (size, date...). And so is the directory changed.
Result:
This is the data on the beginning of the disk after editing C.
A 18:20:
-- B 18:20:
-- C 8kb: 15754
-- D 4kb: 26544
-- E 18:10:
-- F 6kb: 16754
-- G 8kb: 27544
answered Dec 3 at 18:20
SmileDeveloper
113
113
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479935%2fsymlinks-doesnt-change-its-timestamp-when-editing-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Because
b.txt
did NOT change. None of its contituents was modified, only its target.– RudiC
Nov 5 at 16:07
Okay, but the directory is not changed (no files added or removed). Only edited a file in the directory. Why does the date of the directory change? The state of the directory is not changed (files, meta etc).
– SmileDeveloper
Nov 5 at 16:13
@SmileDeveloper that is a new question, but I will answer it anyway. Because it did change.
a.txt
was removed and replaced with a file calleda.txt
.– ctrl-alt-delor
Nov 5 at 16:18
OS systems does only edit the data on the disk that points to
a.txt
's data. Only that is edited. Or is the WHOLE file copied to the memory, file removed and recreated. So when I have a disk file of 4 GB I need to wait before the file is in memory, can be removed, and then can be recreated. That is what you are saying in 'a.txt is removed and replaced'.– SmileDeveloper
Nov 5 at 16:20