Sponsored Content
Top Forums Shell Programming and Scripting find command to filter specific type of files older than certain date. Post 302636907 by ygemici on Tuesday 8th of May 2012 05:30:37 AM
Old 05-08-2012
Quote:
Originally Posted by msathees
Hi

I need to find the list of files in a directory and to do some specific operations based on the type of files.

suppose in a directory am having .dat , .log, .err, .rej file types. i need to filter out .dat and .log only which are older than six months.

i used the below query but the o/p is not as expected.. Can anyone correct me where am wrong..?

Code:
find . -name '*.err' -o -name '*.log'  -print -mtime +180 -print

Moderator's Comments:
Mod Comment Use code tags, see PM, thanks.


---------- Post updated at 02:58 PM ---------- Previous update was at 02:48 PM ----------

the below command has worked

find . -name '*.err' -o -name '*.log' -type f
remove the "print(s)" expres and try again
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unix command/s to find files older than 2 hours in a directory

I need to write a script to find files older than 2 hours in set of direcotries and list them ina mail. I know find command ti list files greater/lesser than days but i need to do it for hours. Any input. (6 Replies)
Discussion started by: Presanna
6 Replies

2. AIX

find files with specific date and time

Hi, I wanna to find files with specific date and time. I know this command: ls -ltr /system1/*.505 | grep 'Jan 18 09:00'. I want the 'Jan 18 09:00' not hard coded, I want it coming from the system date and time. And I want the time varies from 09:00-09:05. Is this possible without heavy... (3 Replies)
Discussion started by: itik
3 Replies

3. UNIX for Dummies Questions & Answers

Help in Find command filter test files

Hi, I want to get all the files under a directory with find command and filter the filenames with "test" . Could you please hep me how can I build this commad Operating System : Solaris 8 (4 Replies)
Discussion started by: TonySolarisAdmi
4 Replies

4. UNIX for Advanced & Expert Users

Deleting older files of a particular type

hi This should be easy but i'm obviously missing something obvious. :) I'm looking to delete files from yesterday and older of extension .txt and there a range of subfolders with these files in them. The command runs but doesn't delete anything. SUSE 10. find /testfolder -maxdepth 2 -type f... (6 Replies)
Discussion started by: cmap
6 Replies

5. Shell Programming and Scripting

Find older files than specified date

Hi, I need to find out list of files which are older than specific date. I am using 'find, and newer' commands but its not giving the correct result. Can you please help to findout the list of files. thanks (2 Replies)
Discussion started by: Satyak
2 Replies

6. Shell Programming and Scripting

Finding older files using find command

Hi All, I want to find files which are older than 15 days. I have written a command as below, find -mtime +15 -print I understand (System date - last modified time of a file) should be greater than or equal to 15 days. This command returns files which are 15 days old.. i.e... (1 Reply)
Discussion started by: nshan
1 Replies

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

8. Shell Programming and Scripting

Find command to search and delete files older than 1 days at a desired location

Hello All, Can someone please help me out in creating the find command to search and delete files older than 1 days at a desired location. Thanks in advance for your help. (3 Replies)
Discussion started by: Pandee
3 Replies

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

10. Shell Programming and Scripting

Command to find files older than 1 hour

Hi, Out of a list of files in a directory, I want to find the files which were created/modified more than 1 hour ago. I am using HP -UNIX and it does not support the argument -mmin. Please advise. I am using # !/bin/sh (4 Replies)
Discussion started by: jhilmil
4 Replies
mime.convs(5)                                                       Apple Inc.                                                       mime.convs(5)

NAME
mime.convs - mime type conversion file for cups DESCRIPTION
The mime.convs file defines the filters that are available for converting files from one format to another. The standard filters support text, PDF, PostScript, HP-GL/2, and many types of image files. Additional filters can be added to the mime.convs file or (preferably) to other files in the CUPS configuration directory. Each line in the mime.convs file is a comment, blank, or filter line. Comment lines start with the # character. Filter lines specify the source and destination MIME types along with a relative cost associated with the filter and the filter to run: super/type super/type cost filter application/postscript application/vnd.cups-raster 50 pstoraster SEE ALSO
classes.conf(5), cupsd(8), cupsd.conf(5), mime.types(5), printers.conf(5), http://localhost:631/help COPYRIGHT
Copyright 2007-2011 by Apple Inc. 20 March 2006 CUPS mime.convs(5)
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy