Please wait while JT SlideShow is loading images...
Vicidial ConsultingCall Centre ConsultancyWeb Design and Search Engine Optimisation

Search CentOS for a File Created on a Specific Date.

At Noble Solutions we handle call recordings for a large number of clients and the number of files stacks into the thousands! We recently had to find a very specific list of files amongst this very large pile and needed a way to find specific files created on specific dates. Heres how:

We use the ls command to retrieve a list of files in the directory and pipe it to grep which then returns only the lines which match our date search.

If we were looking for a file created on the 16th of June 2011 at roughly 5pm we would type:

ls -l | grep 'Jun 16 17'

Using CentOS we can also look for a file created on the 9th of June 2011 at a specific time as well but there is a small change:

ls -l | grep 'Jun(two spaces)9 17:01'

The reason for the two spaces is the way CentOS outputs the results of the ls command.

Note: This may work for other flavours of Linux but we've only tested it on CentOS... In reality this would work for any distro of Linux but you would have to change the grep search parameter to suit the output of the ls command for the distro you are using.



Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! TwitThis Joomla Free PHP

Request a Call Back

Unfortunately there is no one who is able to take your call at this time.

Please try again between 9am and 5pm

Zen Platinum Partner

platinum-partner

We use and recommend Zen Business Broadband for the best possible call quality when using a VoIP phone system.