I am one of those who notes everything on a calendar, which later I will talk about the application I use for my list of things to do, upcoming events so as not to forget them (like my mother-in-law's birthday, or things like that HAHA), and keep something similar to a "log" of my life HAHA.
It happens that a while ago I needed to know the exact date of when I installed my system, a simple command will tell us 😉
ls -lct /etc | tail -1 | awk '{print $6, $7, $8}'
It returns the following to me:
Nov 7 10:33
Which implies that my Arch I installed it on November 7 😀
What it does is something simple, look in our folder / etc / the oldest file, and shows us the date of it.
Greetings and ... let's see, When did you install your system? 😀
Read before in: GnomeTips
46 comments, leave yours
2011-06-28 12:52
You installed it on June 28, 2011, not bad 😀
If I had not screwed up my system a few weeks ago, I would have a few months the same HAHA.
By the way, WELCOME to our site 😉
regards
September 19
Well you can go hiding the wallpapers of girls, nothing is going to happen
Nov 9 09:44
Nov 15 00.32, yes !!! this morning, I reinstalled KDE, of course on Debian.
2011-10-16 21:41 sooo much the data 😉
Cool? HAHA nah, precise and exact HAHAHA.
Apr 30 2010
From Feodra 12 to Fedora 16 ...
WOW here we have the winner ... the longest the installed system has lasted and has not needed to reinstall, WINNER !!! LOL.
Welcome to the site 🙂
Jan 7 2011
😛
Curious ... and more curious is the date that I have seen the installation of my beloved Linux Mint 10 Julia ... 17 Nov 2010 I mean, that in 2 days is his birthday !!! hehehehe
Will we chop him a cake? HAHA
The command is not entirely correct, you assume that the oldest file is always inside / etc, but the oldest file could be inside any part of /, to find the oldest file installed on your system you can use the command :
find / -mount -exec stat -c '% z% n' {} \; 2> / dev / null | sort | head -1
The command takes 1-2 minutes to finish so be patient.
What you do is look for all the files and folders inside the / partition, and only from / because the oldest file on your system should be there (find / -mount), then you do a stat on each file to find out the date the file was created and also know what the name of that file is (-exec stat -c '% z% n' {} \;), then you order the results from the oldest date to the most recent (sort), and finally you get the oldest date (head -1), which results something like this:
2010-12-04 15:43:36.263333335 -0300 /usr/lib/libXdmcp.so
Which gives me the approximate date of the installation of my system on December 4, 2010, that is almost a year ago, but nothing guarantees that this is really the date on which I installed the system, if you look at that is a file that belongs to X.org, therefore when a new version appears and that file is updated, it will stop being the oldest file.
Another possibility if they do not usually clean the system very often would be to check the / var / log, I suppose that somewhere a date related to the installation will be saved.
Ehm ... the '' are single quotes, I don't know why wordpress has the damn mania of formatting them.
Try using the tag for code - » "Code" _________________ "/ Code" 😉
Changing «for the sign of minor what and that 😀
echo 'probando código'
It works 😀
😉
Yes, it may be that the oldest file is in another place, but / etc / because it is a small folder, it can be scanned really quickly, it also contains quite important files and most of them; they only vary rarely. In other words, it is at least in my opinion the most viable way, either because of the speed, and because of the low probability that files such as / etc / hosts or / etc / wgetrc will vary, so the date of these should be without problems the system installation date 🙂
Anyway, really and from the heart, we thank you for the command, quite useful indeed and especially because it is another method to obtain the result 😀
Feb 11 2011
Me on 2011-07-01 16:24, because a few days before I blew my ubuntu 11.04, from there I changed Unity to LXDE, better known as Lubuntu, I clarify that before it was adopted by canonical.
HAHA before it was adopted by Canonical… HAHAHA, let's hope this project (Lubuntu) is on the right track.
Very good tip:
Nov. 5 2010
thanks not very useful but interesting
I get:
Apr 21 19:17
This is because it was when I installed the LTS version, if I had updated without installing from scratch, it would be from May-June 2009 approximately.
regards
Ah yes yes sure 🙂
Dec 31 2010
Out of curiosity I have passed this command to a Red Hat server that I use at work and that I have hardly needed to touch since it was installed (2 network administrators ago), and the result… 2005-11-16 😉
By the way the alternate command suggested by hypersayan_x will probably run faster with this modification:
find / -mount -type f | xargs stat -c '%z %n' 2> /dev/null | sort | head -1
{ find / -mount -type f | xargs stat -c '%z %n'; } 2> /dev/null | sort | head -1
To avoid mistakes like:
find: "/ tmp / kde-kdm": Permission denied
find: "/ tmp / ksocket-kdm": Permission denied
find: "/ tmp / pulse-PKdhtXMmr18n": Permission denied
find: "/ tmp / ksocket-root": Permission denied
find: "/ tmp / kde-root": Permission denied
Dec 31, 2011. Ubuntu upgrade from 11.10 to 12.04. Excellent tips. I am a regular reader of you since init 0, although I did not have something to contribute until now, 3men2 blog.
Thank you
«From init 0»… HAHAHAHA !!!!! well, a pleasure friend, thanks for following us and for the comment 😉
regards
they threw me the madicion with that of the post of "I take X time without having to reinstall"…. This is my number:
Aug 16 12:45
Hello, I know this is a backlog comment, but said command tells me that I installed my system on June 27 of this year. Today is September 30. However I was doing memory and I installed it about 15 or 22 days ago. I don't know if it means the first linux system on the computer. Before that I had, chakra, debian, arch, fedora, ubuntu, solusos and lmde. So far I have fuduntu and I have formatted all of them. I have only kept the / home. I find it interesting because the date should be more recent then. I don't know if he is referring to the date the image was released, but it was taken in April. Possibly the day after tomorrow I update my system. I'm going to see if it changes. By the way very good blog. I congratulate you, I suspect that I will like you.
May 7 2012
it's an arch
It goes jewel, the only thing, I got the time of the utc and I could never change it to the local again, after that, it is excellent
[augusto @ localhost ~] $ ls -lct / | tail -1 | awk '{print $ 6, $ 7, $ 8}'
Nov. 30 2011
ArchLinux <3 with kde.
I was looking for something like that, to know when my last installation was …… thank you.
Feb 14 04:33
I no longer remembered, it was a sudden surprise. Let's not forget that Debian originated from founder Ian and his girlfriend Debra.
I installed it in 89
I have the youngest installation of all
david @ MacbookUbuntu: ~ $ ls -lct / etc | tail -1 | awk '{print $ 6, $ 7, $ 8}'
May 28 14:22
david @ MacbookUbuntu: ~ $
So on the 28th of this month it will be a month that I installed it maybe a little more but of course how the hd gave me problems, because I had to reinstall it to the External HD and leave only the swap and / boot but for the next version I will remove boot and swap of the hd and I will only install the grub registry in the main hd because it gives me many problems
regards
Since December 2012
But it doesn't tell me the year!
$ ls -lct / etc | tail -1 | awk '{print $ 6, $ 7, $ 8}'
Apr 11 2012
Here in gentoo we have a utility that is always used, well that's what I use to remember when it was, the utility is called genlop and with the -t parameter it tells you when you installed this or that package, therefore if one points to the kernel and pipes it to the head command, it tells you which was the first kernel you installed and on what day.
Also remember the time, minutes and seconds ... hehe
$ genlop -t gentoo-sources | head -n3
* sys-kernel / gentoo-sources
Wed Apr 11 23:39:02 2012 >>> sys-kernel / gentoo-sources-3.3.1
The same goes for any package you have or have had installed in gentoo,
without the -ty without pipes it shows you the list of each version you had installed and the current one.
This command is appreciated anyway since it is universal to all distros.
Feb 24 03:42 Debian Jessie
my openSUSE 13.1
Dec 20 2013
Aug 2 2007
Jan 7 2014
May 12 2014
Debian 7.5 Wheezy
Aug 15 2014