11-05-2010
Find first created file date in YYYYMMDD format
Hi All,
We are copying all the files into ARCHIVE directory after we process them. We are doing this process from last 2 years, now we have a lot of files in ARCHIVE directory.
Now I need to find when the first file is copied into this directory?
If I Issue,
ls -l /ARCHIVE/*.* | tail -1
it is showing the file which is created first in archive directory but it is not showing the date in proper format(It is showing as Nov 26, there is no year).
Is there any way to got the date of the first created file in directory in YYYYMMDD format?
Thanks,
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I would like to know how I could get a yesterday date in yyyymmdd e.g. today is 20011109, and I would like to get 20011108. Thank you!:confused: (2 Replies)
Discussion started by: hk_newbie
2 Replies
2. HP-UX
How can i get the yesterday's date in YYYYMMDD format??? (4 Replies)
Discussion started by: prasadsr
4 Replies
3. UNIX for Dummies Questions & Answers
I have a file with some date columns in MM/DD/YYYY format:
SMPBR|DUP-DO NOT USE|NEW YORK||16105|BA5270715|6/6/2007 |MWERNER|109||||JOHN||SMITH|MD|72211118||||||74559|21 WILMINGTON RD||D|11/6/2003|SL# MD CONTACT-LIZ RICHARDS|||0|Y|N||1411458|
And I want to convert the date format to:
... (5 Replies)
Discussion started by: ChicagoBlues
5 Replies
4. Shell Programming and Scripting
In my shell script i have a variable which stores date in the format of YYYYMMDD. Is there any way to format this value to MM/DD/YYYY.
Thanks. (8 Replies)
Discussion started by: nasirgondal
8 Replies
5. Shell Programming and Scripting
How do I change the date format from mmddyyyy to yyyymmdd in PERL.
Can any one help me please. (3 Replies)
Discussion started by: thankful123
3 Replies
6. Solaris
Hi Experts,
How to get date 5 days after current date in YYYYMMDD format?
How do we compare date in YYYYMMDD format?
Thanks (1 Reply)
Discussion started by: needyourhelp10
1 Replies
7. Shell Programming and Scripting
Hello Experts,
How do i get date after 5 days from current date in YYYYMMDD format?
How do you compare date in YYYYMMDD format?
Thanks (8 Replies)
Discussion started by: needyourhelp10
8 Replies
8. Shell Programming and Scripting
Hi all,
i had a code where in user will enter a date in yyyymmdd format.. i didnt use any validation for the date and now the problem is if a user enters date instead of month after year it is proceeding with the code..
like if the date is 20120426 and if the user enters 20122604 it... (4 Replies)
Discussion started by: smarty86
4 Replies
9. Shell Programming and Scripting
My requirement is:- there will be files at a location each day with the date format DDMMYYYY.
Novawise_Activity_Call_Notes_04022013.txt
Novawise_Activity_Inbound_04022013.txt
Novawise_Activity_Inbound_05022013.txt
Novawise_Activity_Call_Notes_05022013.txt... (8 Replies)
Discussion started by: djrulz123
8 Replies
10. Shell Programming and Scripting
Hi All
I need help in converting a string of YYYYMMDD format to date in Sun OS and then find out if the day is a Wednesday or not. The "date -d" option is not working and your help is much appreciated.
The date command usage from the operating system we use here is as follows:
usage: ... (1 Reply)
Discussion started by: SK123
1 Replies
ar(4) Kernel Interfaces Manual ar(4)
NAME
ar - Archive (library) file format
SYNOPSIS
#include <ar.h>
DESCRIPTION
The archive command (ar) combines several files into one. Archives are used mainly as libraries to be searched by the link-editor ld.
A file produced by ar has a magic string at the start, followed by the constituent files, each preceded by a file header. The magic number
and header layout as described in the include file are:
COMMON ARCHIVE FORMAT
ARCHIVE File Organization: _______________________________________________ |__________ARCHIVE_MAGIC_STRING_______________| |__________AR-
CHIVE_FILE_MEMBER_1______________| | | | Archive File Header "ar_hdr" |
|.............................................| | Member Contents | | 1. External symbol directory
| | 2. Text file | |_____________________________________________| |________ARCHIVE_FILE_MEM-
BER_2________________| | "ar_hdr" | |.............................................| | Member Con-
tents (.o or text file) | |_____________________________________________| | . . . | | .
. . | | . . . | |_____________________________________________| |________AR-
CHIVE_FILE_MEMBER_n________________| | "ar_hdr" | |.............................................| |
Member Contents | |_____________________________________________|
The name is a blank-padded string. The ar_fmag field contains ARFMAG to help verify the presence of a header. The other fields are left-
adjusted, blank-padded numbers. They are decimal except for ar_mode, which is octal. The date is the modification date of the file at the
time of its insertion into the archive.
Each file begins on an even (0 mod 2) boundary; a new-line is inserted between files if necessary. Nevertheless the size given reflects
the actual size of the file exclusive of padding.
There is no provision for empty areas in an archive file.
The encoding of the header is portable across machines. If an archive contains printable files, the archive itself is printable.
RESTRICTIONS
File names lose trailing blanks. Most software dealing with archives takes even an included blank as a name terminator.
RELATED INFORMATION
ar(1), ld(1), nm(1) delim off
ar(4)