Search for files on a particular date


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Search for files on a particular date
# 1  
Old 08-18-2011
Search for files on a particular date

I have list of files generated on 2 dates which are shown below:
Code:
-rw-r-----   1 bobby  ccsdba    580945   Aug 16 16:13 file 1
-rw-r-----   1 bobby  ccsdba    580945   Aug 16 16:16 file 2
-rwxrwxr-x   1 Shaan  ccsdba    4422724  Aug 16 16:28 file 3 
-rwxrwxr-x   1 bobby  ccsdba       794      Aug 17 12:50 run_load.lg
-rw-r-----   1 Rocky    ccsdba       251    Aug 17 13:47 file 3

Inorder to get the files from Aug16, what is the command that we going to use ?

The desired output should be like this :
Code:
-rw-r-----   1 bobby  ccsdba    580945   Aug 16 16:13 file 1
-rw-r-----   1 bobby  ccsdba    580945   Aug 16 16:16 file 2
-rwxrwxr-x   1 Shaan  ccsdba    4422724  Aug 16 16:28 file 3

Moderator's Comments:
Mod Comment Please use code tags, thanks. If you furthermore ignore the admin/mod notices on code tags and collect enough infractions, you will be automatically banned - so maybe consider this if you like to get help here.

Last edited by zaxxon; 08-18-2011 at 10:18 AM.. Reason: code tags
# 2  
Old 08-18-2011
Code:
ls -la| grep "Aug 16"

This User Gave Thanks to zaxxon For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Search files between date ranges - Ctime usage

Hello, I am a noob and need some help. I am trying to find files created between a date range. For Example: These are files in directory. -rw-r--r-- 1 user staff 6 May 8 09:43 file1.txt -rw-r--r-- 1 user staff 6 May 8 09:43 file2.txt -rw-r--r-- 1 user... (8 Replies)
Discussion started by: r@v!7*7@
8 Replies

2. Shell Programming and Scripting

How to list files that are not first two files date & last file date for every month-year?

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... (2 Replies)
Discussion started by: Makarand Dodmis
2 Replies

3. Shell Programming and Scripting

Search files with today date and files come anytime in between 10 pm to 1 am

Hi, i want to make script. In a directory everyday( exclude sat and sun) in between 10 pm to 1 am there are 2 files comes and when file comes it will mail us. Format for files is mentioned below. please help me on making this, and also have year end consider and if files come after 12 am it... (6 Replies)
Discussion started by: pallvi_mahajan
6 Replies

4. Debian

Search files that start with current date

hi all, i need to find same files in my directory that looks like this format 20121017145949639.xml (YYYYMMDD*.xml) thanks for help (3 Replies)
Discussion started by: merouan
3 Replies

5. Shell Programming and Scripting

Find and copy files based on todays date and search for a particular string

Hi All, I am new to shell srcipting. Problem : I need to write a script which copy the log files from /prod/logs directory based on todays date like (Jul 17) and place it to /home/hzjnr0 directory and then search the copied logfiles for the string "@ending successfully on Thu Jul 17". If... (2 Replies)
Discussion started by: mail.chiranjit
2 Replies

6. SuSE

Search all files based on first and in all listed files search the second patterns

Hello Linux Masters, I am not a linux expert therefore i need help from linux gurus. Well i have a requirement where i need to search all files based on first patterns and after seraching all files then serach second pattern in all files which i have extracted based on first pattern.... (1 Reply)
Discussion started by: Black-Linux
1 Replies

7. Shell Programming and Scripting

script to search context from 2 files based on date and name

Please Close thread- Thank You. (1 Reply)
Discussion started by: ezmethod
1 Replies

8. Shell Programming and Scripting

Search files between a date range

Hi people A newbie here, thrown into the deep end. I want to select the group of files with in a range of dates and perform some operation on it. Are there inbuild date libraries i can use? I did read thru the old posts on this topic. Couldnt get much idea :(, basically want to know how I... (7 Replies)
Discussion started by: zcanji
7 Replies

9. UNIX for Advanced & Expert Users

Search files with specfic extention and later search content

Hi, I would appriciate if somebody can help me figure out how to search for all the *.xml file under a specific directory and subdirectroies (/home/username) and later search of content "<start>" inside the xml file returned by search. -Lovin.V (2 Replies)
Discussion started by: lovi_v
2 Replies

10. Shell Programming and Scripting

Sorting Files by date and moving files in date order

I need to build a k shell script that will sort files in a directory where files appear like this "XXXX_2008021213.DAT. I need to sort by date in the filename and then move files by individual date to a working folder. concatenate the files in the working folder then start a process once... (2 Replies)
Discussion started by: rebel64
2 Replies
Login or Register to Ask a Question