List files with a specific date...


 
Thread Tools Search this Thread
Operating Systems Solaris List files with a specific date...
# 1  
Old 06-15-2006
Error List files with a specific date...

Hi all,

thanks in advance for reading and anyposts...

I was wondering if its possible to find all files in a directory with a specific date.

I know I can do:

Quote:
find [path] -mtime [int]
but that will only give a list of files greater than todays date... Any ideas?

Thanks,

Marky Mark...
# 2  
Old 06-15-2006
try this thread it is working with two dates which is more than you want, but you should eb able to figure out the changes needed.
# 3  
Old 06-15-2006
Lightbulb

Thanks that looks useful, I post what I come up with once I have got it finished...
# 4  
Old 06-15-2006
what you can do is
ls -ltr |grep 'Jun 15' (for todays files) take care of the extra space when using 1 digit

ls -ltr |grep 'Jun 1'
# 5  
Old 06-15-2006
Lightbulb

Ok I am going to have to get it to execute some commands after, but this is what my script will look like:

Quote:
#!/bin/sh

olddate="200606132359"

newdate="200606150000"

touch -t $olddate ./tmpoldfile
touch -t $newdate ./tmpnewfile

find /u02/oracle/titandata/ -type f -newer ./tmpoldfile ! -newer ./tmpnewfile -ls
eventually I intend to use the -exec rm{} \; command at the end of the statment. Essentially this will enable me to get rid of file which reside in a specific time frame....

...thanks for all your help...

B14... aka.... marky mark...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

Want to get list of Linux commands used on specific date through HISTORY command

I want to get list of linux commands used on Jan 01 2014 with the help of HISTORY command or some other linux commands,. Kindly help. (3 Replies)
Discussion started by: karthick nath
3 Replies

3. Shell Programming and Scripting

Find files for a specific date

Hi, I am looking to find files of a specific date. I am on Sun Solaris so newermt doesnot work.. I thought of using mtime but not getting how to use it. Please help me with this.. Regards Abhinav (3 Replies)
Discussion started by: abhi1988sri
3 Replies

4. Shell Programming and Scripting

Find files with specific date

Dear all, kindly i have some files with different dates i need to grep word from these files but i need to search in files with date 2012-12-02 not all files in this directory do u have any command (4 Replies)
Discussion started by: maxim42
4 Replies

5. UNIX Desktop Questions & Answers

How to delete files from a specific date?

Guys, I am wondering how to remove files for a specific date in a directory? for instance when I do ls -l , i see many files. And i want to delete files for date May 15: 58252015 May 10 03:45 my_05102012.log 58252015 May 15 06:45 my_05152012.log Thanks (8 Replies)
Discussion started by: DallasT
8 Replies

6. UNIX for Dummies Questions & Answers

List of Files which are Greater then a specific date

A newbie question... I need to get a list of the Files and folders which are greater then a specific date. I want write the output to a Text file. What I know ls -lrt gives me list of all the files ordered by date. Also ls > fileName will write the results to a text file. Please help (6 Replies)
Discussion started by: rkaif
6 Replies

7. Filesystems, Disks and Memory

backup of files for a specific date

In Linux Advance server I want to write one script for backing up files for a specific date like 24/07/2008. (3 Replies)
Discussion started by: akm9999
3 Replies

8. Shell Programming and Scripting

backup of files for a specific date

I want to write script for backing up archive logs files for specific date. please give me idea for that. (2 Replies)
Discussion started by: akm9999
2 Replies

9. Filesystems, Disks and Memory

How to list files with specific created date

Hi, Would like to ask, which command is used to list all the files for specific date (says 1st May) and its size, for all files (including its subdirectory), in a mounted NFS disk to HP-UX. I would like to check for the total files came into my disk on 1st May. Very much appreciating your... (2 Replies)
Discussion started by: Draculla
2 Replies

10. Shell Programming and Scripting

List files created between specific date and time

Hi I need to write a script to list files in a directory created within specific date and time for eg list files created between Apr 25 2007 11:00 to Apr 26 2007 18:00. and then i have to count them Any suggestions pls ? (3 Replies)
Discussion started by: jazjit
3 Replies
Login or Register to Ask a Question