LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-12-2012, 10:33 AM   #1
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
List out specific files?


Hello friends,

I have a server which contain monthly log files for past 6 months. I want to list out all files between a specified period for some scripting purpose, let's say between 10 Sept 2012 and 30 Sept 2012. So what are the ways to achieve this? Can find command with -mtime help? Please share the full cmd. Well, it's a Solaris 10 server and moreover one contraint is that the cmd should not take too much time or increase the load.
Thanks a lot!
 
Old 10-12-2012, 11:53 AM   #2
casualfred
Member
 
Registered: Aug 2012
Location: Kentucky, USA
Distribution: Slackware
Posts: 97

Rep: Reputation: 27
I'm pretty sure this post talks about kind of the same thing:
http://www.linuxquestions.org/questi...es-4175424646/
 
Old 10-13-2012, 08:50 AM   #3
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800

Original Poster
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Quote:
Originally Posted by casualfred View Post
I'm pretty sure this post talks about kind of the same thing:
http://www.linuxquestions.org/questi...es-4175424646/
As far as I tried, find with -mtime is helpful, but how can we define a range of dates to search files modified in specified range i.e. between 15-Sept-2012 and 10-Oct-2012 ?
 
Old 10-13-2012, 10:04 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Another user here once posted his collection of date-manipulation utilities, one of which is a date-grep designed specifically for searching through logs.

http://hrop.fresse.org/dateutils/

The page also has a selection of links to other similar projects.
 
1 members found this post helpful.
Old 10-15-2012, 06:56 AM   #5
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Hi

Look after these link,Tells you how to find the files with last modfied date


http://www.cyberciti.biz/faq/howto-f...files-by-date/
 
1 members found this post helpful.
  


Reply

Tags
find, list, mtime



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
list then delete files in a directory with a specific date SparkyL Linux - Newbie 1 02-16-2012 05:04 AM
[SOLVED] List specific files and delete results niiiro Programming 2 07-08-2011 09:08 AM
Need advice on a script to search many files for list of terms, append hits to list jimmy the saint Programming 1 07-11-2010 03:59 AM
Kate: Append files to existing list and enable the Recent List AGazzaz Linux - Software 2 10-13-2009 08:27 PM
Most efficient way to list files changed since a specific time dman65 Linux - General 4 04-07-2005 12:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration