hi...
What is the fastest way or the best way to find yesterday file only and rename file based on file date. The output file format will be in <filename>.YYYYMMDDHHMI format. Please refer my sample as below.
As example, below is the sample input file:-
#ls -l
-rw-rw-r-- 3 acec acec 722944 Jan 24 20:15 TTFILE003623
-rw-rw-r-- 3 acec acec 942080 Jan 24 21:15 TTFILE003624
-rw-rw-r-- 3 acec acec 868352 Jan 24 22:15 TTFILE003625
-rw-rw-r-- 3 acec acec 602112 Jan 24 23:15 TTFILE003626
and the result after renaming are:-
TTFILE003623.201001242015
TTFILE003624.201001242115
TTFILE003625.201001242215
TTFILE003626.201001242315
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.