Sponsored Content
Operating Systems AIX AIX : Find files ignoring certain file extensions Post 302947830 by RavinderSingh13 on Tuesday 23rd of June 2015 01:23:32 AM
Old 06-23-2015
Hello Kev,

Following may help you in same, I haven't tested it but you can take it as a startup and let us know if you have any queries.
Code:
awk -F, '{if(NR>1){printf "\n"};A="find " $1 "/*" " -prune -type f \\( "; {for(i=3;i<=NF;i++){O="! -name *" $i;if(i!=NF){O=O " -o"};P=P?P OFS O:O;print A OFS P;A=P="";};print " \\) -mtime +" $2 " -exec ls -ltr {} \\;"}}' ORS=" " Input_file

Output will be as follows.
Code:
find /Folder1/* -prune -type f \(  ! -name *.txt -o  ! -name *.csv  \) -mtime +30 -exec ls -ltr {} \;
find /Folder2/* -prune -type f \(  ! -name *.sh -o  ! -name *.ksh -o  ! -name *.txt  \) -mtime +60 -exec ls -ltr {} \;
find /folder3/* -prune -type f \(  ! -name *.param   \) -mtime +90 -exec ls -ltr {} \;

If happy with results then you can pass these output to sh as follows. But it is advisable to test it first and if it prints correct expected output then do pass output to sh.


Thanks,
R. Singh

Last edited by RavinderSingh13; 06-23-2015 at 02:29 AM..
This User Gave Thanks to RavinderSingh13 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find files with 3 different extensions

Hi all, From one directory I need to fetch only files of type *.xls,*.csv,*.txt. I tried the find . -name '*.txt,*.csv,*.xls' -print. But it throws me error. Please do help me on this. Thanks Mahalakshmi.A (11 Replies)
Discussion started by: mahalakshmi
11 Replies

2. Shell Programming and Scripting

Find files ignoring subdirectories

Hi guys, I am searching some files not equal to the pattern with this command find ! -name "PATTERN" -type f but my problem is the find command because he also search inside subdirectories and that's the thing i don't want that. Is there any comand to ignore the directories... (4 Replies)
Discussion started by: osramos
4 Replies

3. UNIX for Dummies Questions & Answers

Find all the unique file extensions

Hi How can i find the unique list of file extensions in a folder/subfolders e.g. MAIN/ a.txt b.txt a.clas a.java b.class a.txt.112 c.12.ram.jar i just need to get the below out irrespective of file being present in folder or subfolders txt clas java (5 Replies)
Discussion started by: reldb
5 Replies

4. Shell Programming and Scripting

Ignoring certain extensions

Dear Friends, I want to move all the files to temp folder except files having following extensions which are case sensitive. .ttM .Hmt .dMt Request you to guide me to do the same Thank you in advance Anushree (3 Replies)
Discussion started by: anushree.a
3 Replies

5. Shell Programming and Scripting

Deleting all files recursively from directories while ignoring one file type

Hi, Seems like I need help again with a problem: I want to delete all files from my lets say "Music" Directory inkluding all of the subfolders except for .mp3 and .MP3 files. I tried it with globalignoring mp3 files, finding and deleting all other files, which resulted in all files... (3 Replies)
Discussion started by: pasc
3 Replies

6. Shell Programming and Scripting

adding file extensions to split output files

Hello, I've searched this forum and others for a solution to my problem but nothing seems just right, I'm hoping I can get some help (seems like this should be easy, and I apologize if I've missed something on the forum): I have several large .fastq DNA sequence files (~20million reads,... (2 Replies)
Discussion started by: ljk
2 Replies

7. Shell Programming and Scripting

Find duplicate files but with different extensions

Hi ! I wonder if anyone can help on this : I have a directory: /xyz that has the following files: chsLog.107.20130603.gz chsLog.115.20130603 chsLog.111.20130603.gz chsLog.107.20130603 chsLog.115.20130603.gz As you ca see there are two files that are the same but only with a minor... (10 Replies)
Discussion started by: fretagi
10 Replies

8. AIX

Loading AIX kernel extensions on reboot

Greetings, Does anyone know how to load AIX kernel extensions on reboot? I know that Oracle loads it's postwait kernel extension via a executable in /etc/inittab. I'm assuming this executable calls the "sysconfig" system call and loads it. What if I wrote my own? What is the proper way in AIX to... (3 Replies)
Discussion started by: jbleistein
3 Replies

9. Shell Programming and Scripting

Add file extensions to files EXCEPT the script that is issuing

Greetings all, On a RedHat System - I am issuing a command from script.sh that will add a file extension to a listing of files in a directory. It works, but I need to script from having an extension added as well. Here is what I have tried to no luck: for file in `ls * | awk ' /\./{print... (6 Replies)
Discussion started by: jeffs42885
6 Replies

10. UNIX for Advanced & Expert Users

Find wild card directory and its files of some extensions

I want to use Find command to find directories that have certain name and them find files in that directory having only some extensions. So far, I have come up with this command to list directories with wild card name and list ALL the files in that directory. find . -type d -name prog\* -print... (11 Replies)
Discussion started by: sssccc
11 Replies
DateTime::Locale::kw_GB(3)				User Contributed Perl Documentation				DateTime::Locale::kw_GB(3)

NAME
DateTime::Locale::kw_GB SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'kw_GB' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Cornish United Kingdom. DATA
This locale inherits from the DateTime::Locale::kw locale. It contains the following data. Days Wide (format) De Lun De Merth De Merher De Yow De Gwener De Sadorn De Sul Abbreviated (format) Lun Mth Mhr Yow Gwe Sad Sul Narrow (format) 2 3 4 5 6 7 1 Wide (stand-alone) De Lun De Merth De Merher De Yow De Gwener De Sadorn De Sul Abbreviated (stand-alone) Lun Mth Mhr Yow Gwe Sad Sul Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) Mys Genver Mys Whevrel Mys Merth Mys Ebrel Mys Me Mys Efan Mys Gortheren Mye Est Mys Gwyngala Mys Hedra Mys Du Mys Kevardhu Abbreviated (format) Gen Whe Mer Ebr Me Efn Gor Est Gwn Hed Du Kev Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) Mys Genver Mys Whevrel Mys Merth Mys Ebrel Mys Me Mys Efan Mys Gortheren Mye Est Mys Gwyngala Mys Hedra Mys Du Mys Kevardhu Abbreviated (stand-alone) Gen Whe Mer Ebr Me Efn Gor Est Gwn Hed Du Kev Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) Q1 Q2 Q3 Q4 Abbreviated (format) Q1 Q2 Q3 Q4 Narrow (format) 1 2 3 4 Wide (stand-alone) Q1 Q2 Q3 Q4 Abbreviated (stand-alone) Q1 Q2 Q3 Q4 Narrow (stand-alone) 1 2 3 4 Eras Wide BCE CE Abbreviated RC AD Narrow RC AD Date Formats Full 2008-02-05T18:30:30 = De Merth 5 Mys Whevrel 2008 1995-12-22T09:05:02 = De Gwener 22 Mys Kevardhu 1995 -0010-09-15T04:44:23 = De Sadorn 15 Mys Gwyngala -10 Long 2008-02-05T18:30:30 = 5 Mys Whevrel 2008 1995-12-22T09:05:02 = 22 Mys Kevardhu 1995 -0010-09-15T04:44:23 = 15 Mys Gwyngala -10 Medium 2008-02-05T18:30:30 = 5 Whe 2008 1995-12-22T09:05:02 = 22 Kev 1995 -0010-09-15T04:44:23 = 15 Gwn -10 Short 2008-02-05T18:30:30 = 05/02/2008 1995-12-22T09:05:02 = 22/12/1995 -0010-09-15T04:44:23 = 15/09/-010 Default 2008-02-05T18:30:30 = 5 Whe 2008 1995-12-22T09:05:02 = 22 Kev 1995 -0010-09-15T04:44:23 = 15 Gwn -10 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = De Merth 5 Mys Whevrel 2008 18:30:30 UTC 1995-12-22T09:05:02 = De Gwener 22 Mys Kevardhu 1995 09:05:02 UTC -0010-09-15T04:44:23 = De Sadorn 15 Mys Gwyngala -10 04:44:23 UTC Long 2008-02-05T18:30:30 = 5 Mys Whevrel 2008 18:30:30 UTC 1995-12-22T09:05:02 = 22 Mys Kevardhu 1995 09:05:02 UTC -0010-09-15T04:44:23 = 15 Mys Gwyngala -10 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5 Whe 2008 18:30:30 1995-12-22T09:05:02 = 22 Kev 1995 09:05:02 -0010-09-15T04:44:23 = 15 Gwn -10 04:44:23 Short 2008-02-05T18:30:30 = 05/02/2008 18:30 1995-12-22T09:05:02 = 22/12/1995 09:05 -0010-09-15T04:44:23 = 15/09/-010 04:44 Default 2008-02-05T18:30:30 = 5 Whe 2008 18:30:30 1995-12-22T09:05:02 = 22 Kev 1995 09:05:02 -0010-09-15T04:44:23 = 15 Gwn -10 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 Mth 1995-12-22T09:05:02 = 22 Gwe -0010-09-15T04:44:23 = 15 Sad HHmm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 p.m. 1995-12-22T09:05:02 = 9:05 a.m. -0010-09-15T04:44:23 = 4:44 a.m. Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 p.m. 1995-12-22T09:05:02 = 9:05:02 a.m. -0010-09-15T04:44:23 = 4:44:23 a.m. M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = Mth, 2-5 1995-12-22T09:05:02 = Gwe, 12-22 -0010-09-15T04:44:23 = Sad, 9-15 MMdd (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 MMM (LLL) 2008-02-05T18:30:30 = Whe 1995-12-22T09:05:02 = Kev -0010-09-15T04:44:23 = Gwn MMMd (MMM d) 2008-02-05T18:30:30 = Whe 5 1995-12-22T09:05:02 = Kev 22 -0010-09-15T04:44:23 = Gwn 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = Mth Whe 5 1995-12-22T09:05:02 = Gwe Kev 22 -0010-09-15T04:44:23 = Sad Gwn 15 MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 Mys Whevrel 1995-12-22T09:05:02 = 22 Mys Kevardhu -0010-09-15T04:44:23 = 15 Mys Gwyngala MMMMEd (E MMMM d) 2008-02-05T18:30:30 = Mth Mys Whevrel 5 1995-12-22T09:05:02 = Gwe Mys Kevardhu 22 -0010-09-15T04:44:23 = Sad Mys Gwyngala 15 mmss (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = Mth, 2008-2-5 1995-12-22T09:05:02 = Gwe, 1995-12-22 -0010-09-15T04:44:23 = Sad, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 Whe 1995-12-22T09:05:02 = 1995 Kev -0010-09-15T04:44:23 = -10 Gwn yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = Mth, 2008 Whe 5 1995-12-22T09:05:02 = Gwe, 1995 Kev 22 -0010-09-15T04:44:23 = Sad, -10 Gwn 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 Mys Whevrel 1995-12-22T09:05:02 = 1995 Mys Kevardhu -0010-09-15T04:44:23 = -10 Mys Gwyngala yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 Q1 1995-12-22T09:05:02 = 1995 Q4 -0010-09-15T04:44:23 = -10 Q3 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMM (MM/yyyy) 2008-02-05T18:30:30 = 02/2008 1995-12-22T09:05:02 = 12/1995 -0010-09-15T04:44:23 = 09/-010 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = Mys Whevrel 2008 1995-12-22T09:05:02 = Mys Kevardhu 1995 -0010-09-15T04:44:23 = Mys Gwyngala -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week De Sul SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.18.2 2017-10-06 DateTime::Locale::kw_GB(3)
All times are GMT -4. The time now is 07:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy