script to Find the files based on dates it came


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting script to Find the files based on dates it came
# 1  
Old 12-10-2010
script to Find the files based on dates it came

I need a script to get the files for DEC
the file format will be
B20_abc_ancdfefg_20101209_INCR_201012100145.TXT.gz

Based on the bold ones (date) i need to get the files


can any one help me plzzzzzz
# 2  
Old 12-10-2010
To list all the file names for December 2010 .
Code:
ls -1 B20_abc_ancdfefg_20101209_INCR_201012???????.TXT.gz

# 3  
Old 12-10-2010
Code:
ls *INCR_20101210*

more specific search
Code:
ls *INCR_20101210*TXT.gz

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Call script parameter based on dates

Hi Guys, I am having a script which needs to be iterated based on date passed and itrate based on no of months given. #!/bin/bash var_d=$1 months=$2 sh invoke_script var_d i need to iterate the inside script something like below sh invoke_script 170101 sh invoke_script... (4 Replies)
Discussion started by: Master_Mind
4 Replies

2. Shell Programming and Scripting

To run the script based on dates

I am having below script which needs to be executed based on start and end date #!/bin/bash array=('2016-09-27' '2016-10-27' '2016-11-27' '2016-12-27' '2017-01-27' '2017-02-27' '2017-03-27' '2017-04-27' '2017-05-27' '2017-06-27' '2017-07-27' '2017-08-27' '2017-09-27' ) for i in "${array}" do... (9 Replies)
Discussion started by: rohit_shinez
9 Replies

3. Red Hat

Delete files older than 1week(dates need to be calculate based on file name)

Objective: We have multiple files in a folder and we want to delete all files except for last 1 week files. Note: We are copying these files from original location to this temporary location. So time shown for these files are time when we copied to this location. Not that when file was created.... (2 Replies)
Discussion started by: Agoyals1986
2 Replies

4. Shell Programming and Scripting

How to find all files other than last two dates per month and year?

Hi All, lets say there are following files in directory -rwxr-xr-x 1 user userg 1596 Mar 19 2012 a.txt -rwxr-xr-x 1 user userg 1596 Mar 19 2012 b.txt -rwxr-xr-x 1 user userg 1596 Mar 22 2012 c.txt -rwxr-xr-x 1 user userg 1596 Mar 24 2012 d.txt... (16 Replies)
Discussion started by: Makarand Dodmis
16 Replies

5. Shell Programming and Scripting

How to find all files other than first two dates & last date per month and year?

how to find all files other than first two dates & last date per month and year Hi All, lets say there are following files in directory -rwxr-xr-x 1 user userg 1596 Mar 19 2012 a.txt -rwxr-xr-x 1 user userg 1596 Mar 19 2012 b.txt -rwxr-xr-x 1 user userg ... (6 Replies)
Discussion started by: Makarand Dodmis
6 Replies

6. UNIX for Advanced & Expert Users

Find all files other than first two files dates & last file date for month

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (16 Replies)
Discussion started by: Makarand Dodmis
16 Replies

7. UNIX for Dummies Questions & Answers

To find files with specific dates and cp another folder.

Hi all, We have an existing script: find /u03/oraprod/perpcomn/admin/out -type f -ctime +7 \ -exec cp {} "/u08/oraprod/backup/cout" \; Which is to find all files more than 7 days and copy to another folder. However I would like to only list files with Sep 29, and cp to another folder. ... (2 Replies)
Discussion started by: *Jess*
2 Replies

8. Shell Programming and Scripting

Need script to generate all the dates in DDMMYY format between 2 dates

Hello friends, I am looking for a script or method that can display all the dates between any 2 given dates. Input: Date 1 290109 Date 2 010209 Output: 300109 310109 Please help me. Thanks. :):confused: (2 Replies)
Discussion started by: frozensmilz
2 Replies

9. Shell Programming and Scripting

Find files based on permissions

Hi. I want to get a list of files, in a given folder, that aren't world readable (a+r). I've looked at the documentation on the FIND command, however I don't see how to list files by excluding permissions. find . -perm 644 -> would list only files that are 644 If I could use wildcards, I... (1 Reply)
Discussion started by: dmilks
1 Replies

10. UNIX for Advanced & Expert Users

Find files based on time

Hi, Whats the command for finding files older then 20mins. This has to be part of the find command as it will be part of a cleanup script. thanks Budrito (4 Replies)
Discussion started by: budrito
4 Replies
Login or Register to Ask a Question