Sponsored Content
Top Forums Shell Programming and Scripting Printing Year in ls -ltr command Post 62537 by ragugct on Thursday 17th of February 2005 01:26:56 AM
Old 02-17-2005
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 help m,e in getting year part of the file using ls command.

Thanks in advance.


Ragu
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

what does the ls -ltr command list

Hi, THe following is the output when i run the command ls -ltr can anyone explain the meaning of the field in red -rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027SASI.gnt -rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027RITD.gnt -rw-r----- 3 orca orca ... (2 Replies)
Discussion started by: ranjita.c
2 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. UNIX for Dummies Questions & Answers

Extracting only file size of the ls -ltr command.

All, I only need to get the file size when I do an ls -ltr filename.txt Could you give me the exact syntax. Thanks KOP (6 Replies)
Discussion started by: kingofprussia
6 Replies

4. Shell Programming and Scripting

ls -ltr command On Remote server

I am writing a script where in i have to log into a remote machine and check for necessary file by typing (ls -ltr *200505) (this gets all 05month of 2008 yr files) and if files are found get them to the local machine. If not found print a message saying no files on local machine. When i was... (2 Replies)
Discussion started by: vasuarjula
2 Replies

5. 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

6. 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

7. Emergency UNIX and Linux Support

LAST command with Year

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. 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

9. Shell Programming and Scripting

I have two commands “ls -h” and “ls -ltr”. How do i make sure “ls -ltr” is run after “ls -h” is suc

help me (2 Replies)
Discussion started by: sonu pandey
2 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
audisp(1M)																audisp(1M)

NAME
audisp - display the audit information as requested by the parameters SYNOPSIS
username] eventname] compartmentname] syscall] ttyid] start_time] stop_time] audit_trail... DESCRIPTION
analyzes and displays the audit information contained in the specified audit trails. All specified audit trails are merged into a single audit trail in chronological order. Although the entire audit trail is analyzed, the command allows you to limit the information displayed by specifying different options. This command is restricted to privileged users. If the audit information was collected in compatibility mode, each audit trail (audit_trail) is identified by a file name. If the audit information was collected in regular mode, the audit trail (audit_trail) is identified by a directory name. Only a privileged user can configure the auditing mode (compatibility or regular); see audsys(1M). The audit information that is collected in regular mode is identi- fied and displayed by directory names and not by file name since the file names may not represent complete trail information for analysis or display. Any unspecified option is interpreted as an unrestricted specification. For example, a missing option causes all users' audit information in the audit trail to be displayed as long as all other specified options are satisfied. As well, providing the option without the option causes all audit information beginning from start_time to the end of the trail to be displayed. If you invoke the command without any options, displays all recorded information from the start of the audit trail to the end. Specifying an option without its required parameter results in an error. For example, specifying without any eventname returns an error message. Options If this option is specified, does not terminate after it displays the last event. Instead, it waits for and displays audit events as they become avail- able. Specify the username (login name) for which to display the audit information. If no username is specified, displays audit information for all users in the audit file. Display audit information for the specified event category. eventname must be a valid event category (base event or event alias) that is defined in or (see audit.conf(4)). Another way to be certain an eventname is valid is to read the output of for a list of valid event category names and their associated system calls (see audevent(1M)). Display audit information on the specified compartment. See compartments(5). If no compartmentname is specified, displays audit information about all the compartments in the audit file. If compartments feature is disabled in the running configuration, this option is ignored. Display audit information about the specified system call. The syscall must be a valid system call name or system call alias name that is defined in or (see audit.conf(4)). Another way to be certain a syscall is valid is to read the output of for a list of valid syscall names (see audevent(1M)). Display only successful operations that were recorded in the audit trail. A user event that results in a failure is not displayed, even if username and eventname are specified. The and the options are mutually exclusive; do not specify both on the same command line. To display both successful and failed operations, omit both and options. Display only failed operations that are recorded in the audit trail. Display all operations that occurred on the specified terminal (ttyid) and were recorded in the audit trail. By default, operations on all terminals are displayed. Display all audited operations occurring since start_time, specified as mmddhhmm[yy] (month, day, hour, minute, year). If the year is specified and is greater than 70, it is interpreted as in the twentieth century. Otherwise, it is interpreted as in the twenty-first century. If no year is given, the current year is used. No operation in the audit trail occurring before the specified time is displayed. Display all audited operations occurring before stop_time, specified as mmddhhmm[yy] (month, day, hour, minute, year). If the year is specified and is greater than 70, it is interpreted as in the twentieth century. Otherwise, it is interpreted as in the twenty-first century. If no year is given, the current year is used. No operation in the audit trail occurring after the specified time is displayed. The year is displayed as a two digit number (with or as a four digit number (with The default is Note that start_time and stop_time must still be specified as two digit num- bers. AUTHOR
was developed by HP. FILES
file containing event mapping information file containing site-specific event mapping information SEE ALSO
audevent(1M), audit(4), audit.conf(4), audit(5), compartments(5). audisp(1M)
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy