10-14-2008
Last Command not giving year
Hi All,
i want the last login details along with year.
i tried below command but not giving me the year of last login.
last <$Userid> | head -1
i heard that if it is current year then it wont display the year else it will display the year. is it so?
if yes then , is there any way of even displaying even year for the current year?
can any one please help me in this?
Regards,
Ananda
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all ..
As per rule i searched the forum i am not able found out ...
I want to display the year in when listing the files .. when i use ls -lt it is not displaying files with recent 6 month old ..
I know that perderabo has written a script for that if you give that link it will be... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
2. Solaris
I am used to using "set -o emacs" and then using "CNTL-P" for getting previous commands in solaris but on one host it does not work and instead just makes a DONG!!
# ksh
# set -o emacs
# ls
# ^p
Can anyone offer guidance as to why this is?
Thank you my friends.
akbar (0 Replies)
Discussion started by: akbar
0 Replies
3. Linux
Hi Guys,
I am using Red Hat Linux 5 and GNOME Terminal is available there in the Accessories menu of Applications. But I don't see any run command option which can be used to type the name of the terminal and execute it directly as I used to do it under Mandrake Linux wherein I would type... (2 Replies)
Discussion started by: indiansoil
2 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
i want the last login details along with year.
i tried below command but not giving me the year of last login.
last <$Userid> | head -1
i heard that if it is current year then it wont display the year else it will display the year. is it so?
if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies
5. Shell Programming and Scripting
Hello,
i am developing a simple shell script for simulation of wc command but it's not working.Please tell me what is the problem. I have commented the problematic line
if
then
echo "<Improper Usage>"
echo "wcassg <options> file"
else
eval file=\$$#
if
then
chars=0
words=0... (2 Replies)
Discussion started by: salman4u
2 Replies
6. Shell Programming and Scripting
Hi All,
i have a file which have many fields delimited by ,(comma)
now i have to show only few fields and not all.
the sample text file looks like this:
TYPE=SERVICEEVENT, TIMESTAMP=05/06/2009 11:01:40 PM, HOST=sppwa634, APPLICATION=ASComp, FUNCTION=LimitsService, SOU... (8 Replies)
Discussion started by: usha rao
8 Replies
7. Emergency UNIX and Linux Support
Hi Guys, I'm trying to identify the last logins by all the users in the system in AIX. the last command gives me the output, but there is no year displayed for it . Since there is a duplication of months i mean Apr 2010 and Apr 2009 also its giving me inaccurate data.. Is there a way I can filter... (4 Replies)
Discussion started by: kkeng808
4 Replies
8. AIX
Hello,
There is a process in AIX which is actually a oracle database user session but is running very slow When I use lsof it give below output
lsof /proc/21955180
In while loop:256
In while loop:256
In while loop:256
In while loop:256
Value of I :183 np:1024
Please... (1 Reply)
Discussion started by: Vishal_dba
1 Replies
9. Shell Programming and Scripting
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
Have a file where i stored ls -l command output,
-rw-r--r-- 1 360 600 94255 Jan 01 11:16 file1_2020.csv
-rw-r--r-- 1 360 600 114573 Dec 29 11:10 file2_2019.csv
-rw-r--r-- 1 360 600 41006 Dec 30 11:09 file3_2019.csv
-rw-r--r-- 1 360 ... (9 Replies)
Discussion started by: kumarinfa
9 Replies
LEARN ABOUT PHP
easter_days
EASTER_DAYS(3) 1 EASTER_DAYS(3)
easter_days - Get number of days after March 21 on which Easter falls for a given year
SYNOPSIS
int easter_days ([int $year = date("Y")], [int $method = CAL_EASTER_DEFAULT])
DESCRIPTION
Returns the number of days after March 21 on which Easter falls for a given year. If no year is specified, the current year is assumed.
This function can be used instead of easter_date(3) to calculate Easter for years which fall outside the range of Unix timestamps (i.e.
before 1970 or after 2037).
The date of Easter Day was defined by the Council of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the
Spring Equinox. The Equinox is assumed to always fall on 21st March, so the calculation reduces to determining the date of the full moon
and the date of the following Sunday. The algorithm used here was introduced around the year 532 by Dionysius Exiguus. Under the Julian
Calendar (for years before 1753) a simple 19-year cycle is used to track the phases of the Moon. Under the Gregorian Calendar (for years
after 1753 - devised by Clavius and Lilius, and introduced by Pope Gregory XIII in October 1582, and into Britain and its then colonies in
September 1752) two correction factors are added to make the cycle more accurate.
PARAMETERS
o $year
- The year as a positive number. If omitted, defaults to the current year according to the local time.
o $method
- Allows Easter dates to be calculated based on the Gregorian calendar during the years 1582 - 1752 when set to CAL_EASTER_ROMAN.
See the calendar constants for more valid constants.
RETURN VALUES
The number of days after March 21st that the Easter Sunday is in the given $year.
EXAMPLES
Example #1
easter_days(3) example
<?php
echo easter_days(1999); // 14, i.e. April 4
echo easter_days(1492); // 32, i.e. April 22
echo easter_days(1913); // 2, i.e. March 23
?>
SEE ALSO
easter_date(3).
PHP Documentation Group EASTER_DAYS(3)