file/dir dates from BEFORE I installed?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
lazarus
Level 3
Level 3
Posts: 153
Joined: Mon Jul 02, 2018 11:36 pm
Location: Oberon, OZ

file/dir dates from BEFORE I installed?

Post by lazarus »

LM 18.3 Cinnamon x64

This was a fresh installation on 19 Jun '18 and while familiarising myself with the directory structure, I noticed something odd...

Code: Select all

lazarus@Beelzebub / $ ls -l
total 96
drwxr-xr-x   2 root root  4096 Jun 20 16:51 bin
--8<--
drwxr-xr-x   2 root root 12288 Jul  9 20:29 sbin
drwxr-xr-x   2 root root  4096 Nov 24  2017 srv
dr-xr-xr-x  13 root root     0 Jul 12 15:15 sys
drwxrwxrwt  14 root root  4096 Jul 12 15:17 tmp
drwxr-xr-x  10 root root  4096 Nov 24  2017 usr
drwxr-xr-x  12 root root  4096 Nov 25  2017 var
Now, I assume that ls returns a default of atime? In which case /srv, /usr & /var were last accessed 6 months before the install?

Looking at ctime:

Code: Select all

lazarus@Beelzebub / $ ls -lc
total 96
drwxr-xr-x   2 root root  4096 Jun 20 16:51 bin
--8<--
drwxr-xr-x   2 root root 12288 Jul  9 20:29 sbin
drwxr-xr-x   2 root root  4096 Jun 19 13:49 srv
dr-xr-xr-x  13 root root     0 Jul 12 15:15 sys
drwxrwxrwt  14 root root  4096 Jul 12 15:17 tmp
drwxr-xr-x  10 root root  4096 Jun 19 13:49 usr
drwxr-xr-x  12 root root  4096 Jun 19 13:49 var
Everything looks good there; actually they're among the very few dirs that still have a ctime equal to their creation date! But given the atime stamps. something doesn't add up. Is this likely to cause any problems down the line?

Or is it merely a minor hiccup such that any 'fixing' would be pointless for anything except soothing my OCD? :oops:

(FWIW, there are a few other files in /home that show similar discrepancies but I'm nowhere near as concerned about them as I am about system files...)
- Andy

I may be weird but I'm saving up to become eccentric.
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: file/dir dates from BEFORE I installed?

Post by smurphos »

They are the date's they were created on the ISO image you've installed. Nothing to worry about.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Mute Ant
Level 14
Level 14
Posts: 5129
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: file/dir dates from BEFORE I installed?

Post by Mute Ant »

"...I assume that ls returns a default of atime..." That turns out not to be the case

man ls "...instead of default modification time..."
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named "manual".
lazarus
Level 3
Level 3
Posts: 153
Joined: Mon Jul 02, 2018 11:36 pm
Location: Oberon, OZ

Re: file/dir dates from BEFORE I installed?

Post by lazarus »

Thanks. In retrospect, mtime makes more sense.
Mute Ant wrote:
Thu Jul 12, 2018 3:49 am
"...I assume that ls returns a default of atime..." That turns out not to be the case

man ls "...instead of default modification time..."
Heh. Yeah, I read that part of the man differently, as "instead of default modification time: atime..." the inference being that atime is the default.

Now if they'd referred to it as mtime instead... :roll:
- Andy

I may be weird but I'm saving up to become eccentric.
User avatar
GS3
Level 7
Level 7
Posts: 1813
Joined: Fri Jan 06, 2017 7:51 am

Re: file/dir dates from BEFORE I installed?

Post by GS3 »

I noticed something similar in Windows. I would download a file to my disk and Windows would report something like "Date created: Jul 12, 2018", "Date modified: April 8, 2012".

At first I was confused that a file could be modified before it was created but then I understood the creation date is when this copy was created on this disk, not when the original file was created elsewhere. So it is correct that the file was last modified years ago but was created minutes ago.

It is important to understand what exactly the parameters and attributes mean. Also, a file has the same contents if copied between different OS and hard disk formats but the attributes are not part of the file and are different from one OS to another and can be lost or modified when copying. For instance, Linux has an *executable* attribute which Windows does not have. Copy a file from Linux to Windows and then back to Linux and the original value of that attribute is lost.
Please do not use animated GIFs in avatars because many of us find them distracting and obnoxious. Thank you.
Post Reply

Return to “Newbie Questions”