LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 08-19-2008, 04:56 AM   #1
xemous
Member
 
Registered: Jun 2004
Posts: 80

Rep: Reputation: 15
Ubuntu / Solaris date command differences


I use a script to flag old files and it wont port to my my solaris machine.

In Ubuntu it was working fine,

Code:
date -r "+%s" "%filepath"
would produce the seconds from 1970 the file was last modified in.

Theres no such options on the date command in solaris, is there a separate command that does something similar?
 
Old 08-19-2008, 05:51 AM   #2
xemous
Member
 
Registered: Jun 2004
Posts: 80

Original Poster
Rep: Reputation: 15
I found the find command useful for this task that I used it in my ubuntu script also.
 
Old 08-19-2008, 02:10 PM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Welcome to the world of *nix variants.

You can install the pre-built GNU tools from http://www.sunfreeware.com/, or modify your scripts to be portable using the native tools for a given *nix variant.
 
  


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
What are the major differences between Solaris and Linux? apache363 Solaris / OpenSolaris 42 09-30-2009 03:48 PM
about the possible next release date for solaris ... alred Solaris / OpenSolaris 2 07-05-2006 02:06 PM
differences between Solaris and Redhat9? linux_manual Linux - Networking 3 08-27-2004 02:43 PM
porting linux date script to Solaris svar Linux - Software 5 05-29-2004 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

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

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