01-31-2011
Hi Frds
thanx for your Rply
grt thanx to Perderabo for his datecalc function
my next question to Perderabo
can you plz explain me date2jd and jd2date,lastday Function.
waiting for your Rply
thanx
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. Windows & DOS: Issues & Discussions
Hi,
I'm writing an batch file to create report
In the batch file iam passing two arguments:startdate and finishdate
Ex: startdate=07-sep-2009 finishdate=07-sep-2011
I need to have script that takes command line argument as input and gives me out currentdate last year and current date... (2 Replies)
Discussion started by: anand1773
2 Replies
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
Hi,
I want to subtract 'n' days from the current timestamp in a k shell script. Is there any inbuilt function to do it
or any workaround solution to get the date. And I want the output to be in YYYY:MM:DD HH:MM:SS format. Please help.
Thanks in advance. (4 Replies)
Discussion started by: Suryaaravindh
4 Replies
7. Shell Programming and Scripting
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)
Discussion started by: xxxx
6 Replies
8. Shell Programming and Scripting
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
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. HP-UX
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
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)