LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-15-2015, 11:48 AM   #16
cheap freelancer
LQ Newbie
 
Registered: Jun 2007
Location: buybook.in
Distribution: redhat
Posts: 6

Rep: Reputation: 0

This is not a good design, en.wikipedia.org/wiki/Year_2038_problem.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 04-15-2015, 06:25 PM   #17
cfajohnson
LQ Newbie
 
Registered: Aug 2012
Distribution: Linux Mint 17
Posts: 22

Rep: Reputation: Disabled
Quote:
Originally Posted by konenas View Post
Thanks!

date is a standard and has more options than stat
Code:
date -r $file +'%Y-%m-%d %H:%M:%S'
Note that this will fail if $file contains spaces or other pathological characters. It should be:

Code:
date -r "$file" +'%Y-%m-%d %H:%M:%S'
But note that the -r option to date is non-standard, and will not be available on all systems; stat is also non-standard and the syntax varies between systems.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
time stamp for file modification youngstorm Linux - Newbie 2 11-01-2005 03:46 PM
Heeelp! How to preserve file date modification attribute Slackovado Slackware 1 03-30-2005 09:36 AM
File Modification Date Comparison MadTurki Programming 7 03-08-2004 04:02 PM
Warning: File 'sendmail.cf' has modification time in the future G-Rad Linux - Newbie 0 03-06-2004 11:09 PM
perl, Net::Ftp, and Novell file modification time neo77777 Programming 0 01-30-2003 09:41 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:38 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