Sponsored Content
Operating Systems HP-UX awk command in hp UNIX subtract 30 days automatically from current date without date illegal option Post 303027789 by Scrutinizer on Monday 24th of December 2018 11:20:46 AM
Old 12-24-2018
@Bakunin: that looks like a neat trick. It does not seem to work on HP-UX, however (max 24 hours)...
It appears to only work on AIX and IRIX to the full extent.

I found the following maximum time shifts using the date utility with the TZ variable...
Code:
AIX:     Works (No limit)
IRIX:    Works (No Limit)
Tru64:   Max. 7 days
Solaris: Max. 7 days (using /usr/xpg4/bin/date)
MacOS:   Max. 7 days
HP-UX:   Max. 1 day
Linux:   Max. 1 day

Of course on Linux one would not need the trick since it has GNU date...

Last edited by Scrutinizer; 12-24-2018 at 12:29 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to find a date which is 7 days past when given current date

hii all. I have to get the date of the 7th day past from the current date. if i give the current date as sep 3 then i must get the date as 27th of august. can we get the values from the "cal" command. cal | awk '{print $2}' will this type of command work. actually my need is if today is... (17 Replies)
Discussion started by: ladtony
17 Replies

2. Solaris

date -d illegal option in Solaris

Hi All, Is it possible to run date -d option in Solaris? Do we have a work around so that -d option will be recognized by solaris as it is recognized by linux. I need this since i am using this in scripting and it works in Linux box. my problem is it doesn't work in solaris box. ... (6 Replies)
Discussion started by: linuxgeek
6 Replies

3. Shell Programming and Scripting

how to get what date was 28 days ago of the current system date IN UNIX

Hi, Anybody knows how to get what date was 28 days ago of the current system date through UNIX script. Ex : - If today is 28th Mar 2010 then I have to delete the files which arrived on 1st Mar 2010, (15 Replies)
Discussion started by: kandi.reddy
15 Replies

4. Shell Programming and Scripting

Date after 5 days from current date in YYYYMMDD format

Hello Experts, How do i get date after 5 days from current date in YYYYMMDD format? How do you compare date in YYYYMMDD format? Thanks (8 Replies)
Discussion started by: needyourhelp10
8 Replies

5. Shell Programming and Scripting

date: illegal option -- d in sun solaris

Hi all, I am trying to execute the following command in a sun solaris machine and getting the error as below. bash-2.03$ date -d "1 day ago" +%Y%m%d date: illegal option -- d bash-2.03$ uname -a SunOS gtrd02 5.8 Generic_117350-55 sun4u sparc SUNW,Sun-Fire-V440 Can anybody help me to... (1 Reply)
Discussion started by: Tuxidow
1 Replies

6. Shell Programming and Scripting

How to Get 60 days Old date from current date in KSH script

Hi i am writing a cron job. so for it i need the 60 days old date form current date in variable. Like today date is 27 jan 2011 then output value will be stote in variable in formet Nov 27. i am using EST date, and tried lot of solution and see lot of post but it did not helpful for me. so... (3 Replies)
Discussion started by: Himanshu_soni
3 Replies

7. Shell Programming and Scripting

Number of days between the current date and user defined date

I am trying to find out the number of days between the current date and user defined date. I took reference from here for the date2jd() function. Modified the function according to my requirement. But its not working properly. Original code from here is working fine. #!/bin/sh... (1 Reply)
Discussion started by: hiten.r.chauhan
1 Replies

8. Shell Programming and Scripting

Seven days past date from current date

hi all.. i want 2 know how 2 find 7days past date from current date.. when i used set datetime = `date '+%m%d%y'` i got 060613.. i just want to know hw to get 053013.. i tried using date functions but couldnt get it :( i use c shell and there is no chance that i can change that ..... (3 Replies)
Discussion started by: Rahul619
3 Replies

9. UNIX for Beginners Questions & Answers

Subscribers with Date 90 days older than current date

I have to display only those subscribers which are in "unconnected state" and the date is 90 days older than today's date. Below command is used for this purpose: cat vfsubscriber_20170817.csv | sed -e 's/^"//' -e '1d' | nawk -F '",' '{if ( (substr($11,2,4) == 2017) && ( substr($11,2,8) -lt... (1 Reply)
Discussion started by: dia
1 Replies

10. Shell Programming and Scripting

Subtract a file's modification date with current date

SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise Hi, In a folder, there are files. I have a script which reads the current date and subtract the modification date of each file. How do I achieve this? Regards, Joe (2 Replies)
Discussion started by: roshanbi
2 Replies
lvmadm(1M)																lvmadm(1M)

NAME
lvmadm - display limits associated with a volume group version SYNOPSIS
vg_vers] DESCRIPTION
The command is used to perform the actions below: o Display the limits associated with a volume group version. o Display the LVM configuration that is contained in and files for the indicated volume group version. o Update the entries of the bootable volume group and the boot information present in the boot disk either during or after boot. With the boot disk's physical location changing prior to reboot or when the system is booted with a cloned disk, the entries of the bootable volume group and the boot information present in the boot disk may be out of sync with the kernel. In such a situation, follow- ing root volume group activation (either during boot or post boot) use the command in migrate mode option) to update the information present in the file and the boot information present in the boot disk with the kernel. See lvm(7) for more details. Options and Arguments recognizes the following options: Display a table of limits for the indicated volume group version. Display limits or configuration for volume group version vg_vers. The default is to display limits for all supported volume group versions. Display the LVM configuration that is contained in the and files. Produce a compact listing of fields described in The output is a list of colon separated fields formatted as: Update the information present in the file for the bootable volume group and the boot information present in the boot disk, with the information present in the kernel, if there is any mismatch. Display With -t Option For each volume group version to be displayed (one if is specified, all if is omitted) displays the following. VG Version The volume group version. Max VG Size (Tbytes) The maximum size of a volume group in terabytes. Max LV Size (Tbytes) The maximum size of a logical volume in terabytes. Max PV Size (Tbytes) The maximum size of a physical volume in terabytes. Max VGs The maximum number of volume groups this volume group version supports on a system. Max LVs The maximum number of logical volumes in a volume group. Max PVs The maximum number of physical volumes in a volume group. Max Mirrors The maximum number of mirrors for a logical volume. Max Stripes The maximum number of stripes for a logical volume. Max Stripe Size (Kbytes) The maximum stripe size for a logical volume in kilobytes. Max LXs per LV The maximum number of extents in a logical volume. Max PXs per PV The maximum number of extents in a physical volume. Max Ext Size (Mbytes) The maximum size of an extent in megabytes. Display with -l Option For each volume group version to be displayed (one if is specified, all if is omitted) displays the following: o The list of volume groups that exist on the system, and o The list of physical volumes belonging to each of the volume groups. The LVM configuration displayed by this option is from data contained in the and files. The command fails if these files are missing or corrupt. Compact Listing (-F Option) The option generates a compact and parsable listing of the command output in colon separated fields formatted as The option is designed to be used by scripts. The resulting command output may be split across multiple lines. The output may include new keys and/or values in the future. If a key is deprecated, its associated value is set to Compact Listing for -t option Below is a sample output: Compact Listing for -l option Below is a sample output: EXTERNAL INFLUENCES
Environment Variables determines the language in which messages are displayed. If is not specified or is null, it defaults to "C" (see lang(5)). If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)). EXAMPLES
Display a table of limits for volume group version 2.0. Display the LVM configuration file contents for volume group version 1.0. AUTHOR
was developed by HP. SEE ALSO
vgcreate(1M), lvm(7). lvmadm(1M)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy