[SunRescue] FreeBSD date and Solaris date commands

oneiros rescue at sunhelp.org
Thu Mar 8 01:36:33 CST 2001


Thus spake Ron Rosson (insane at oneinsane.net):

> I am still leaning new things with my ultra1 running solaris 2.8. My
> latest hangup is the date command.
> 
> On a FreeBSD box when I run:
>         date -v-1d +%m-%d-%Y
> I get:  
>         03-06-2001
> 
> On my Solaris 2.8 box it dont work. Basically I just need it to tell me
> what yesterdays date was.

Solaris's date doesn't have that functionality.  All it can do is display the
current date and format it with strftime(), or set the date.  BSD and GNU date
can do date calculations.  Your best route would be to compile BSD or GNU date
and pop it in /usr/local/bin.

-- 
 oneiros <oneiros at darkspire.net>    1024D/62C2F77D
 url: http://oneiros.darkspire.net/ EBB8 AF14 8C43 2F12 7623
 irc: EFnet / opn                   C0AA C0AE 56D4 62C2 F77D



More information about the rescue mailing list