LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-16-2005, 04:41 PM   #1
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Determine date when linux was installed


I have a couple boxes at work that I need to find out when linux was installed. Is there a way to find this out (ie. ls -al <some file>)? Much appreciated. Thanks!

-twantrd
 
Old 05-16-2005, 05:21 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
The most likely candidate would be a
Code:
find / -exec ls -ld --time-style=long-iso {} \; | sort -k 6,7 | head -n 1
as root ...


Cheers,
Tink
 
Old 05-16-2005, 05:55 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
I was thinking along the line of ls -al /opt
 
Old 05-16-2005, 06:13 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
And my suggestion doesn't work if you have stuff installed from
old tarballs ... :) ... I just ran it on my machine and found things
from 1989 in /home ;}

Last edited by Tinkster; 05-16-2005 at 06:15 PM.
 
Old 05-16-2005, 10:00 PM   #5
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Original Poster
Rep: Reputation: 52
Hi guys,

Tinkster, I tried your suggestion out and apparently it comes up:

twantrd:/# find / -exec ls -ld --time-style=long-iso {} \; | sort -k 6,7 | head -n 1
ls: cannot read symbolic link /proc/2/exe: No such file or directory
ls: cannot read symbolic link /proc/3/exe: No such file or directory
ls: cannot read symbolic link /proc/4/exe: No such file or directory
ls: cannot read symbolic link /proc/5/exe: No such file or directory
ls: cannot read symbolic link /proc/6/exe: No such file or directory
ls: cannot read symbolic link /proc/7/exe: No such file or directory
ls: cannot read symbolic link /proc/143/exe: No such file or directory
ls: cannot read symbolic link /proc/144/exe: No such file or directory
find: /proc/25853/fd/4: No such file or directory
brw-rw---- 1 root cdrom 11, 0 2002-03-14 13:54 /dev/scd0

That didn't really help me much .


Homey,
I tried yours and I think I got the right answer.

Thanks you guys.

-twantrd
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I determine what version of Linux is running? DStrick64 Linux - Newbie 17 05-30-2012 09:29 AM
How can I determine the version of an installed module? evolutionspeak Linux - Newbie 2 10-06-2005 01:50 AM
Determine version of Linux OS? amiableboy Linux - Newbie 2 07-21-2005 04:16 AM
How do login managers determine installed GUIs? bitpicker Linux - General 18 08-08-2004 09:00 AM
How to determine compile time arguments for an installed rpm? coolamit78 Linux - Software 5 04-22-2004 03:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration