- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to get an earlier date hp ux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 02:19 AM
07-07-2005 02:19 AM
how to get an earlier date hp ux
i need to get an earlier date, but do not know how to do.Is there any command for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 02:27 AM
07-07-2005 02:27 AM
Re: how to get an earlier date hp ux
Are you asking to set the date of the system back to an earlier date?
Setting the system date back in time can be dangerous, especially if you have time sensitive applications like databases.
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 02:28 AM
07-07-2005 02:28 AM
Re: how to get an earlier date hp ux
1. you want to change the date of a file to previous date (not very wise if the file is being used by an application dependent on the modification date and time but it can be done). If this is the case, use the "touch" command as follows
touch -t YYMMDDhhmm filename
2. you want to know what day of the week certan number of days ago, or what was the date lets say 129 days ago etc. In which case please use the script of your choice (PERL or Shell) provided by Clay Stephenson of these forums, found here:
Shell Version: http://mirrors.develooper.com/hpux/caljd-2.23.sh
PERL Version: http://mirrors.develooper.com/hpux/caljd-2.2.pl
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 02:35 AM
07-07-2005 02:35 AM
Re: how to get an earlier date hp ux
it's the same date command that you have to use.
See the man pages for format
Giacomo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 02:42 AM
07-07-2005 02:42 AM
Re: how to get an earlier date hp ux
If you want to adjust the system date, the format is:
date MMDDhhmmCCYY
where MM=two digit MONTH
DD=two digit DAY
hh=two digit MILITARY time (1pm = 13)
mm=two digit minute
CC=two digit CENTURY (20 or possibly 19)
YY=two digit YEAR
So to set the date back to February 28th, 2005 at 1:18 PM, do this:
date 022813182005
But again, I stress that this can be dangerous! Going back past Y2K (2000) can also cause issues. A reboot might me necessary in either case.
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 01:48 PM
07-07-2005 01:48 PM
Re: how to get an earlier date hp ux
There are two conditions
1. If you want to adjust or change the system date, the format is:
date MMDDhhmmCCYY
where MM=two digit MONTH
DD=two digit DAY
hh=two digit MILITARY time (1pm = 13)
mm=two digit minute
CC=two digit CENTURY (20 or possibly 19)
YY=two digit YEAR
2. If you want to know the previous year or month ...then the command is "cal"
# cal 7 1999
this will show you the monthly view of July 1999.
syntax is : # cal
I think this should solve your purpose...
regds
Venkatesan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 04:48 PM
07-07-2005 04:48 PM
Re: how to get an earlier date hp ux
cal
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 05:34 PM
07-07-2005 05:34 PM
Re: how to get an earlier date hp ux
for ex:
today system date is: Fri Jan 8 08:34:34 EETDST 2005
and when i give '15 day defore' for input,
i want to see
Dec 24 2004 for an output.
So How?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2005 11:40 PM
07-07-2005 11:40 PM
Re: how to get an earlier date hp ux
You can write a little programme in C with time function.
See man page with the command "man 2 time".
Roland
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2005 12:12 PM
07-08-2005 12:12 PM
Re: how to get an earlier date hp ux
Then it's very easy:
DT=$(caljd.sh $(caljd.sh -p 15))
echo "Date 15 days ago was ${DT}"
Invoke as caljd.sh -u for full usage and many examples.