Sponsored Content
Full Discussion: How to find time
Top Forums UNIX for Dummies Questions & Answers How to find time Post 302090294 by dakid on Sunday 24th of September 2006 11:12:06 PM
Old 09-25-2006
blowtorch,

i have an archive directory which when the file is too old, when im viewing the files in long format, the field for time is replaced by the year.
i want to know if there is a command to know when a specific file was last modified because i cant see it useing the ls -l command.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can any how we can find the time diffrence...?

Hi, I am trying to caluate the time elasped by the job to run.For that i have used the following command: I have one file which contains the following more start.txt 991 STARTED Fri Aug 10 14:04:20 2007 Starting Job JOB_NAME. (...) 1036 STARTED Fri Aug 10 14:04:31 2007 ... (1 Reply)
Discussion started by: Amey Joshi
1 Replies

2. Solaris

find files by time

I'm working on a SunOS 5.8 box and I have to search recursively in directories matching a certain pattern for files with a .log extension that have changed within the last n-minutes, and than select the least recently used file and open it for reading, preferrably with tail. Does anyone know how I... (3 Replies)
Discussion started by: rein
3 Replies

3. Shell Programming and Scripting

how to find the time before 30 minutes

Hi All, I want to find out the time before 30 minutes. I am able to do with in hours limit. date Fri Aug 21 06:50:00 BST 2009 TZ=CST+1 date Fri Aug 21 04:50:02 CST 2009 Can any one please help me (6 Replies)
Discussion started by: vikash_k
6 Replies

4. AIX

How to find time difference between 2 timestamps?

HI All, can some one please help me how to fine the difference between two time stamps say a= Nov 10, 2009 9:21:25 AM b= Nov 10, 2009 10:21:25 AM I want to find difference between the a & b I googled and tried with some options but no luck. My OS is AIX (1 Reply)
Discussion started by: bandlan9
1 Replies

5. Shell Programming and Scripting

Find and Convert UTC Time to PST Time

Hello All - I have a script that grabs data from the net and outputs the following data 46029 46.144 -124.510 2010 07 26 22 50 320 4.0 6.0 2.2 9 6.8 311 1012.1 -0.9 13.3 13.5 13.3 - - 46041 47.353 -124.731 2010 07 26 22 50 250 2.0 3.0 1.6 8 6.4 - 1011.6 - ... (0 Replies)
Discussion started by: drexnefex
0 Replies

6. Linux

Find last system shut down time

Hi, I need to find the last system shutdown time. I got a command last that is used for this.But the command is not give the year. Below i posted the sample output last -x |grep shutdown shutdown system down 2.6.31.5-server- Tue Jan 11 11:45 - 11:46 (00:00) shutdown system down ... (6 Replies)
Discussion started by: maruthu
6 Replies

7. Shell Programming and Scripting

what would a script include to find CPU's %system time high and user time high?

Hi , I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( . how to find cpu's system high time and user time high in a script?? thanks , help would be appreciated ! :) (9 Replies)
Discussion started by: sushwey
9 Replies

8. Shell Programming and Scripting

How to find time difference?

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 ================================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (1 Reply)
Discussion started by: wnaguib
1 Replies

9. UNIX for Dummies Questions & Answers

Find time difference

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 =============== =================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (23 Replies)
Discussion started by: wnaguib
23 Replies

10. Programming

Find gaps in time data and replace missing time value and column 2 value by interpolation in awk

Dear all, I am kindly seeking assistance on the following issue. I am working with data that is sampled every 0.05 hours (that is 3 minutes intervals) here is a sample data from the file 5.00000 15.5030 5.05000 15.6680 5.10000 16.0100 5.15000 16.3450 5.20000 16.7120 5.25000... (4 Replies)
Discussion started by: malandisa
4 Replies
AR(1)							    BSD General Commands Manual 						     AR(1)

NAME
ar -- create and maintain library archives SYNOPSIS
ar -d [-TLsv] archive file ... ar -m [-TLsv] archive file ... ar -m [-abiTLsv] position archive file ... ar -p [-TLsv] archive [file ...] ar -q [-cTLsv] archive file ... ar -r [-cuTLsv] archive file ... ar -r [-abciuTLsv] position archive file ... ar -t [-TLsv] archive [file ...] ar -x [-ouTLsv] archive [file ...] DESCRIPTION
The ar utility creates and maintains groups of files combined into an archive. Once an archive has been created, new files can be added and existing files can be extracted, deleted, or replaced. Files are named in the archive by a single component, i.e., if a file referenced by a path containing a slash (``/'') is archived it will be named by the last component of that path. When matching paths listed on the command line against file names stored in the archive, only the last component of the path will be compared. All informational and error messages use the path listed on the command line, if any was specified, otherwise the name in the archive is used. If multiple files in the archive have the same name, and paths are listed on the command line to ``select'' archive files for an oper- ation, only the first file with a matching name will be selected. The normal use of ar is for the creation and maintenance of libraries suitable for use with the loader (see ld(1)) although it is not restricted to this purpose. The options are as follows: -a A positioning modifier used with the options -r and -m. The files are entered or moved after the archive member position, which must be specified. -b A positioning modifier used with the options -r and -m. The files are entered or moved before the archive member position, which must be specified. -c Whenever an archive is created, an informational message to that effect is written to standard error. If the -c option is specified, ar creates the archive silently. -d Delete the specified archive files. -i Identical to the -b option. -m Move the specified archive files within the archive. If one of the options -a, -b or -i are specified, the files are moved before or after the position file in the archive. If none of those options are specified, the files are moved to the end of the archive. -o Set the access and modification times of extracted files to the modification time of the file when it was entered into the archive. This will fail if the user is not the owner of the extracted file or the super-user. -p Write the contents of the specified archive files to the standard output. If no files are specified, the contents of all the files in the archive are written in the order they appear in the archive. -q (Quickly) append the specified files to the archive. If the archive does not exist a new archive file is created. Much faster than the -r option, when creating a large archive piece-by-piece, as no checking is done to see if the files already exist in the archive. -r Replace or add the specified files to the archive. If the archive does not exist a new archive file is created. Files that replace existing files do not change the order of the files within the archive. New files are appended to the archive unless one of the options -a, -b or -i is specified. -T Select and/or name archive members using only the first fifteen characters of the archive member or command line file name. The his- toric archive format had sixteen bytes for the name, but some historic archiver and loader implementations were unable to handle names that used the entire space. This means that file names that are not unique in their first fifteen characters can subsequently be confused. A warning message is printed to the standard error output if any file names are truncated. (See ar(5) for more infor- mation.) -L Used the extended format to allow long archive member names. This is the default. -s Write an object-file index into the archive, or update an existing one, even if no other change is made to the archive. You may use this modifier flag either with any operation, or alone. Running `ar s' on an archive is equivalent to running `ranlib' on it. -t List the specified files in the order in which they appear in the archive, each on a separate line. If no files are specified, all files in the archive are listed. -u Update files. When used with the -r option, files in the archive will be replaced only if the disk file has a newer modification time than the file in the archive. When used with the -x option, files in the archive will be extracted only if the archive file has a newer modification time than the file on disk. -v Provide verbose output. When used with the -d, -m, -q or -x options, ar gives a file-by-file description of the archive modifica- tion. This description consists of three, white-space separated fields: the option letter, a dash (``-'') and the file name. When used with the -r option, ar displays the description as above, but the initial letter is an ``a'' if the file is added to the archive and an ``r'' if the file replaces a file already in the archive. When used with the -p option, the name of each printed file is written to the standard output before the contents of the file, pre- ceded by a single newline character, and followed by two newline characters, enclosed in less-than (``<'') and greater-than (``>'') characters. When used with the -t option, ar displays an ``ls -l'' style listing of information about the members of the archive. This listing consists of eight, white-space separated fields: the file permissions (see strmode(3) ), the decimal user and group ID's, separated by a single slash (``/''), the file size (in bytes), the file modification time (in the date(1) format ``%b %e %H:%M %Y''), and the name of the file. -x Extract the specified archive members into the files named by the command line arguments. If no members are specified, all the mem- bers of the archive are extracted into the current directory. If the file does not exist, it is created; if it does exist, the owner and group will be unchanged. The file access and modification times are the time of the extraction (but see the -o option). The file permissions will be set to those of the file when it was entered into the archive; this will fail if the user is not the owner of the extracted file or the super-user. The ar utility exits 0 on success, and >0 if an error occurs. ENVIRONMENT
TMPDIR The pathname of the directory to use when creating temporary files. FILES
/tmp default temporary file directory ar.XXXXXX temporary file names COMPATIBILITY
By default, ar writes archives that may be incompatible with historic archives, as the format used for storing archive members with names longer than fifteen characters has changed. This implementation of ar is backward compatible with previous versions of ar in that it can read and write (using the -T option) historic archives. The -T option is provided for compatibility only, and will be deleted in a future release. See ar(5) for more information. STANDARDS
The ar utility is expected to offer a superset of the IEEE Std 1003.2 (``POSIX.2'') functionality. SEE ALSO
ld(1), ranlib(1), strmode(3), ar(5) Darwin November 28, 2001 Darwin
All times are GMT -4. The time now is 12:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy