Results 1 to 4 of 4
I could understand the idea of security "if I haven't touched the file in 9 days, and the timestamp was changed, I know someone was in my system". But, is ...
- 03-31-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 87
What is the purpose of preserving timestamps?
I could understand the idea of security "if I haven't touched the file in 9 days, and the timestamp was changed, I know someone was in my system". But, is there any other purpose for preserving timestamps?
- 03-31-2011 #2Just Joined!
- Join Date
- Mar 2011
- Location
- India
- Posts
- 14
The only purpose of time stamp is to denote at what time a event has occurred and it is basically used for that. In terms of security it is very useful.
- 03-31-2011 #3Linux Newbie
- Join Date
- Nov 2008
- Location
- Tokyo, Japan
- Posts
- 243
I don't think time stamps are for security. At least, I have never heard of them used for that purpose. If you want to check to make sure the contents of files haven't been changed, you need to use tools like "md5sum".
Using the "touch" command can update the file's time stamp without even opening the file. This is mostly used for two reasons:- To trick an incremental backup system to backup that file. Ordinarily, incremental backups only copy files that have newer timestamps than the last backup timestamp.
- To force a "make" script to re-compile all files that depend on that file. Make heavily uses timestamps to compute which files need to be re-compiled. To save time, it will only re-make files that are newer than the Makefile script itself.
Another reason not to preserve timestamps is when you are very stingy for file sizes. Timestamp information can take several bytes of extra space per file, which can add up if you are streaming an archive of hundreds of millions of small files over a network. If timestamp information is really not necessary, you can skip it to improve bandwidth and file size. But lately, disk space is cheap enough, and networks are fast enough, that skipping the time stamps won't really make noticeable difference, and timestamps can be pretty important in some situations you might not expect.Last edited by ramin.honary; 03-31-2011 at 07:47 AM.
- 03-31-2011 #4Just Joined!
- Join Date
- Mar 2011
- Location
- India
- Posts
- 14
Timestamps are used for security. I didn't mean that. Its just a way of security to know someooe has viewed ur file over a period of time when u was away.


Reply With Quote