Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 04-17-2007, 05:56 AM   #1
LQ Newbie
Registered: Mar 2007
Posts: 16

Rep: Reputation: 0
Current timestamp by reading a file

How can I get the current system time by reading a file (like something from /proc)?

I do not want to open a remote shell. I just want to use sftp subsystem only.

Old 04-17-2007, 06:38 AM   #2
Registered: Jun 2006
Location: Sydney
Distribution: Gentoo + Debian
Posts: 132

Rep: Reputation: 15
There is no such file within /proc as far as I can tell.
Old 04-17-2007, 07:36 AM   #3
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,402
Blog Entries: 1

Rep: Reputation: 64
In my kernel there is
root@babylon5:~>cat /proc/driver/rtc 
rtc_time        : 09:34:13
rtc_date        : 2007-04-17
rtc_epoch       : 1900
alarm           : 07:50:00
DST_enable      : no
BCD             : yes
24hr            : yes
but I am unsure if it is a standard interface you can count on for a long term project. Anyway...


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
Subversion timestamp in file darkarcon2015 Linux - Software 1 05-17-2006 07:45 PM
How to get the timestamp of a file? operand Linux - Newbie 7 01-20-2006 04:14 AM
Insert date and timestamp Into File name petenyce Linux - Newbie 9 10-13-2005 12:16 PM
Timestamp of file/directories Ephracis Linux - Software 1 12-16-2004 09:21 AM
add timestamp to name of file how? supafly Linux - General 3 11-14-2001 11:06 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:51 PM.

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