Sponsored Content
Full Discussion: LAST command with Year
Homework and Emergencies Emergency UNIX and Linux Support LAST command with Year Post 302429908 by kkeng808 on Wednesday 16th of June 2010 05:25:23 AM
Old 06-16-2010
-t will only give you the users who were logged into the system at that particular time. It wont give you the logs after that for ex... bash-3.00# last -t 201001010001 root pts/3 sa2sscp027 Dec 30 21:11 - 21:26 (43+00:15) root pts/1 sa2sscp027 Dec 30 17:11 - 21:26 (43+04:15) The above tells me only the users who were on the system at 1st Jan 2010 00:01 hrs
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to find out the exact year in "Last modified time" using ls command

Hi, I understand that the ls command with "-l" option generates the "last modified time" of specific directory. However, some generated results displayed the "last modified time" with detail about the last modified year, for example: -rwxrwxrwx+ 1 smith dev 10876 May 16 2005 part2 ... (6 Replies)
Discussion started by: Dophlinne
6 Replies

2. UNIX for Dummies Questions & Answers

listing year in ls command

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

3. Shell Programming and Scripting

Printing Year in ls -ltr command

Hi, When retrieving parameters of a file using ls command i need to print the year part . When i do ls -ltr the following output is displayed -rwxrwxrwx 1 d_infd d_infd 1711 Jan 8 2004 wf1.class. Here the year part is not displayed only Jan 8 is displayed. Can any one... (9 Replies)
Discussion started by: ragugct
9 Replies

4. Shell Programming and Scripting

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... (1 Reply)
Discussion started by: ani_rvce
1 Replies

5. UNIX for Dummies Questions & Answers

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... (1 Reply)
Discussion started by: ani_rvce
1 Replies

6. Linux

uptime command output when the server is running more than one year?

What is the uptime command output when the server is running more than one year? My doubt is whether it show in number of days format or number years and number of days format? For example, Assume the server is running 400 days 3 hrs 3 min 3 secs. The output like 400 days 3:3 min or 1 year 5... (3 Replies)
Discussion started by: maruthu
3 Replies

7. UNIX for Dummies Questions & Answers

Unix man command to find out month of the year?

how can i display month of the year i was born with using man command? thanks (2 Replies)
Discussion started by: janetroop95
2 Replies

8. Shell Programming and Scripting

Find week of the year for given date using date command inside awk

Hi all, Need an urgent help on the below scenario. script: awk -F"," 'BEGIN { #some variable assignment} { #some calculation and put values in array} END { year=#getting it from array and assume this will be 2014 month=#getting it from array and this will be 05 date=#... (7 Replies)
Discussion started by: vijaidhas
7 Replies

9. UNIX for Dummies Questions & Answers

Command to print previous year in UNIX

hi all, I use date +%Y which gives Current year. Requirement: I want previous year to be printed. Please help me. Note: I tried date +%d/%m/%Y -d "-1 years" which is not working. (10 Replies)
Discussion started by: wasim999
10 Replies

10. UNIX for Beginners Questions & Answers

Insert year in ls -l command

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
utmp(5) 							File Formats Manual							   utmp(5)

Name
       utmp, wtmp - login records

Syntax
       #include <utmp.h>

Description
       The  file  records  information	about  who  is currently using the system.  The file is a sequence of entries with the following structure
       declared in the include file:
       struct utmp {
	       char    ut_line[8];	       /* tty name */
	       char    ut_name[8];	       /* user id */
	       char    ut_host[16];	       /* host name, if remote */
	       long    ut_time; 	       /* time on */
       };

       This structure gives the name of the special file associated with the user's terminal, the user's login name, and the time of the login	in
       the form of

       The  file  records  all	logins and logouts.  A null user name indicates a logout on the associated terminal.  A terminal referenced with a
       tilde (~) indicates that the system was rebooted at the indicated time.	The adjacent pair of entries with terminal names referenced  by  a
       vertical  bar  (|)  or  a right brace (}) indicate the system-maintained time just before and just after a command has changed the system's
       timeframe.

       The file is maintained by and Neither of these programs creates the file, so, if it is removed, record-keeping is turned off.  It is summa-
       rized by

Files
See Also
       last(1), lastcomm(1), login(1), who(1), ac(8), init(8)

																	   utmp(5)
All times are GMT -4. The time now is 02:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy