SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Linux OS.: Technical questions

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Thomas A Watson who wrote (343)5/1/2003 11:05:17 AM
From: Thomas A Watson  Read Replies (1) of 484
 
the date command.
[ 2964 ] > date --v
date (GNU sh-utils) 2.0.11

date --help for all args. I use the date command to create file names or time stamps of events in log scripts.

To create files that will sort in date order with simple ls.
date +%Y"_"%m"_"%d"_"%H"_"%M"_"

[ 2962 ] > date +%Y"_"%m"_"%d"_"%H"_"%M"_"
2003_05_01_10_16_

to add seconds.
[ 2962 ] > date +%Y"_"%m"_"%d"_"%H"_"%M"_"
2003_05_01_10_16_13_ I use _ character but any character can be used.

Set current system time using www.time.gov
This sets time but not data. must be root.

before doing this, make sure you are connected to the internet and see the result of the lynx dump before you use it in the date command. Should get system time within 1 second of gov time.

lynx -dump time.gov\?Eastern/d/-5 -connect-timeout 10 |head -3|tail -1

date -s `lynx -dump time.gov\?Eastern/d/-5 -connect-timeout 10 |head -3|tail -1`
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext