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)
Hi all,
I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date.
So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
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)
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)
Well guys,
I know the right syntax for displaying the current date is $(date). However, I am planning to send emails to some customers which displays their subscription date, and then the expiry. The expiry being 30 days from the current date.
What would the right syntax be? (6 Replies)
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)
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)
Hi all,
I have been researching to obtain SSL certification expiry for most of our webistes. For some cases, some hosts where not directly accessible so i finally got a solution working with curl using my proxy. This lists the expiry date which i'm finally looking for.
# curl --proxy... (4 Replies)
current date command runs well
awk -v t="$(date +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
subtract 30 days fails
awk -v t="$(date --date="-30days" +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
awk command in hp unix subtract 30 days automatically from current date without date illegal option error... (20 Replies)
Discussion started by: kmarcus
20 Replies
LEARN ABOUT SUSE
chage
chage(1) General Commands Manual chage(1)NAME
chage - change user password expiry information
SYNOPSIS
chage [-D binddn] [-P path] [-m mindays]
[-M maxdays] [-d lastday] [-I inactive] [-E expiredate] [-W warndays] user
chage -l [user]
DESCRIPTION
chage is used to list and change the password expiry information of a user. It allows the system administrator to change the number of days
between allowed and required password changes and the date of the last password change. It allows also to define when an account will
expire. The chage command is restricted to the system administrator, except for the -l option, which may be used by an user to determine
when his password or account is due to expire.
If no option is given, chage operates in an interactive mode, prompting the user with the current values for all of the fields. Enter the
new value to change the field, or leave the line blank to use the current value. If the users exists in the local passwd file, but not in
the local shadow file, chage will create a new entry in the shadow file.
OPTIONS -D, --binddn binddn
Use the Distinguished Name binddn to bind to the LDAP directory. The user will be prompted for a password for simple authentica-
tion.
-P, --path path
The passwd and shadow files are located below the specified directory path. chage will use this files, not /etc/passwd and
/etc/shadow. This is useful for example on NIS master servers, where you do not want to give all users in the NIS database auto-
matic access to your NIS server and the NIS map is build from special files.
-l, --list
This option will list the password expiry information in a human readable format. The user will see the date when he changed the
password the last time, when the password will be expire, when the password will be locked and when the account will expire.
-m, --mindays mindays
With this option the minimum number of days between password changes is changed. A value of zero for this field indicates that the
user may change her password at any time. Else the user will not be permitted to change the password until min days have elapsed.
-M, --maxdays maxdays
With this option the maximum number of days during which a password is valid is changed. When maxdays plus lastday is less than the
current day, the user will be required to change his password before being able to use the account.
-d, --lastday lastday
With this option the date when the password was last changed can be set to another value. lastday has to be specified as number of
days since January 1st, 1970. The date may also be expressed in the format YYYY-MM-DD. If supported by the system, a value of zero
forces the user to change the password at next login.
-E, --expiredate expiredate
With this option the date when the account will be expired can be changed. expiredate has to be specified as number of days since
January 1st, 1970. The date may also be expressed in the format YYYY-MM-DD.
-I, --inactive inactive
This option is used to set the number of days of inactivity after a password has expired before the account is locked. A user whose
account is locked must contact the system administrator before being able to use the account again. A value of -1 disables this
feature.
-W, --warndays warndays
With this option the number of days of warning before a password change is required can be changed. This option is the number of
days prior to the password expiring that a user will be warned the password is about to expire.
FILES
passwd - user account information
shadow - shadow user account information
SEE ALSO passwd(1), passwd(5)AUTHOR
Thorsten Kukuk <kukuk@suse.de>
pwdutils November 2005 chage(1)