Linux date
has the -d
feature which is missing in Solaris. So how can I go about subtracting or adding days or months to a date on Solaris.
相关问题
- Date with SimpleDateFormat in Java
- Why should we check WIFEXITED after wait in order
- softlinks atime and mtime modification
- UNIX Bash - Removing double quotes from specific s
- VBA local timezone adjustment
相关文章
- Making new files automatically executable?
- Reverse four length of letters with sed in unix
- MYSQL: How can I find 'last monday's date&
- Compile and build with single command line Java (L
- Calculate number of working days in a month [dupli
- Get file created date in node
- Extracting columns from text file using Perl one-l
- Temporal Extraction (i.e. Extract date/time entiti
What you need is GNU date for Solaris. (Linux uses GNU tools)
If you are using a recent version of Solaris (no my friend, Solaris 10 can no longer be considered a recent version of Solaris) then it is installed by default. Just use
gdate
command instead ofdate
command.This reply has more answers for you. Just follow the links in that reply for what to do on Solaris 10. You sysadmin may already have done this for you. Before you proceed: Have you checked if
gdate
is available on your system ?you still can do this with perl or python oneliners, e.g., substract one day from current date: