Hi, I am new to Perl. I need help with file search for the following scenario.
Currently as part of the archiving process, we have archived the files under
/$rootdir/Archive/yyyy directory where yyyy is year.
During the archiving process, for each day, yyyymmdd_trn.ls t file and yyyymmdd_trn.ta r.gz files are created where lst file will contain the names of all files that have been archived under yyyymmdd_trn.ta r.gz file.
I am in the process of extracting (gunzip) given file from appropriate .tar.gz file into /$rootdir/Archive/Extract directory for reuse.
I am able to extract the required file, when I know the archive date.
The problem is when I don't know the archive date, I will be able to search the file name that I want to extract and identify the .lst file name.
Eg: The file that I need to extract is abc999877777.xm l
This name should be in contents of one of the .lst file under /$rootdir/Archive/yyyy
I want to search contents of all .lst file under Archive directry for match abc999877777.xm l to identify which year (yyyy) directory and name of the .lst file.
Can you help me to achive this? Quick response is appreciated? Thanks.
Regards,
Sutharsan
Currently as part of the archiving process, we have archived the files under
/$rootdir/Archive/yyyy directory where yyyy is year.
During the archiving process, for each day, yyyymmdd_trn.ls t file and yyyymmdd_trn.ta r.gz files are created where lst file will contain the names of all files that have been archived under yyyymmdd_trn.ta r.gz file.
I am in the process of extracting (gunzip) given file from appropriate .tar.gz file into /$rootdir/Archive/Extract directory for reuse.
I am able to extract the required file, when I know the archive date.
The problem is when I don't know the archive date, I will be able to search the file name that I want to extract and identify the .lst file name.
Eg: The file that I need to extract is abc999877777.xm l
This name should be in contents of one of the .lst file under /$rootdir/Archive/yyyy
I want to search contents of all .lst file under Archive directry for match abc999877777.xm l to identify which year (yyyy) directory and name of the .lst file.
Can you help me to achive this? Quick response is appreciated? Thanks.
Regards,
Sutharsan
Comment