Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to find out the exact year in "Last modified time" using ls command Post 302070975 by Dophlinne on Tuesday 11th of April 2006 02:52:50 AM
Old 04-11-2006
Error 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

some results, on the other hand, only display the detail about the time but not the year, for example:

-rwxrwxrwx+ 1 smith dev 10876 May 16 9:42 part2

I would appreciate if anybody could tell me how to find out the last modified year if I got the latter result, i.e. output with last modified time only.

Thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

"find command" to find the files in the current directories but not in the "subdir"

Dear friends, please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories.. it is like this, current directory contains file1, file2, file3, dir1, dir2 and dir1 conatins file4, file5 and dir2 contains file6,... (9 Replies)
Discussion started by: swamymns
9 Replies

2. UNIX for Advanced & Expert Users

add seconds to: date"|"time"|"HHMMSS

Hey all, I have a shell that invokes a AWK. In this AWK i want invoke a function that receives 3 parameters: date: 20080831 time: 235901 duration: 00023 that function receive this 3 parameters and sum to this value two more seconds: 2008083123590100025 Remember that in case that... (3 Replies)
Discussion started by: anaconga
3 Replies

3. Shell Programming and Scripting

How to remove "New line characters" and "spaces" at a time

Dear friends, following is the output of a script from which I want to remove spaces and new-line characters. Example:- Line1 abcdefghijklmnopqrstuvwxyz Line2 mnopqrstuvwxyzabcdefghijkl Line3 opqrstuvwxyzabcdefdefg Here in above example, at every starting line there is a “tab” &... (4 Replies)
Discussion started by: anushree.a
4 Replies

4. UNIX for Advanced & Expert Users

command for recently modified files - "find" command not working

I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Problem with "find" and "grep" command

I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank). In a first approach I coded: find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt But this doesn't work. I got an error (under Ubuntu): grep:... (5 Replies)
Discussion started by: pstein
5 Replies

7. Shell Programming and Scripting

"ps -ef" command and exact matching

Hi Guys, I am working in ksh88 and need the output of "ps -ef" command to give me the exact match of my pattern, for example: $ ps -ef 'gen_sub' UID PID PPID NLWP PGID SID STIME TIME COMMAND op 9209 8249 1 9209 9209 14:52:57 00:00 /usr/bin/ksh... (3 Replies)
Discussion started by: aoussenko
3 Replies

8. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

9. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

10. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 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 10:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy