Sponsored Content
Operating Systems Linux Ubuntu [Solved] Using Find with an exclude/exclude file Post 302567227 by metallica1973 on Sunday 23rd of October 2011 10:07:47 AM
Old 10-23-2011
awesome
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how do i exclude the current directory when using find?

i want to compile a list of files in all sub directories but exclude the current directory. the closest i could get was to search 'only' the current directory, which is the opposite of what i wanted. find . ! -name . -prune (7 Replies)
Discussion started by: mjays
7 Replies

2. UNIX for Dummies Questions & Answers

find command to exclude directories

Howdy I have this directory structure ... eep eepaptest eepfatest eepgltest eep.old eeppoptest ehf ehfaptest ehfgltest ehp ehpgltest I want to find files in these directories, but I want to exclude eep, ehf & ehp. Cany anyone help with the correct command ?? (1 Reply)
Discussion started by: SmurfGGM
1 Replies

3. Shell Programming and Scripting

Find but exclude directories

Hello, I have a line in my script to find the files changed in the last 24 hours. It is as below: find /home/hary -type f -mtime -1 I now want to exclude a directory named "/home/hary/temp/cache" from the above find command. How do I add it to my script? Any help is appreciated. ... (9 Replies)
Discussion started by: tadi18
9 Replies

4. Shell Programming and Scripting

Help - Find command to exclude sub-directories

Hi Forum. I'm trying to write a script that finds and deletes files that are older than 300 days. The script will read a table that contains the following 3 columns: 1st col: “Y” means sub-directory scan; "N" means no subdirectory scan 2nd col: sub-directory location 3rd col: File prefix... (7 Replies)
Discussion started by: pchang
7 Replies

5. Shell Programming and Scripting

Exclude a directory in 'find'

Hi, I'm in the process of writing a shell script which will be ran under cron hourly and will check for files of specific age in my ftp folder, then moves those over inside a folder called "old" (which is within the ftp dir). But, I'm unable to figure out how to exclude the "old" folder when... (1 Reply)
Discussion started by: mutex1
1 Replies

6. Shell Programming and Scripting

Find command with exclude

I had a Shell script that removes the files that are in a directory older than the specified days. find /test/files -mtime +10 I would like to add another condition to the find command above that is to exclude any file starting with ‘CGU' Thanks (1 Reply)
Discussion started by: db2dbac
1 Replies

7. UNIX for Dummies Questions & Answers

How to find from / but exclude certain folder?

:)Hi Unix Specialists, I need your advice on how to find all the files from root ( / ) filesystem but exclude those from /export/home (different filesystem) folder. Below are some of the find statements that I have tried without success: find / -name '/export/home' -prune -o print -ls ... (6 Replies)
Discussion started by: gjackson123
6 Replies

8. Shell Programming and Scripting

How-To Exclude Directory in find command

How can i tweak the below find command to exclude directory/s -> "/tmp/logs" find . -type f \( ! -name "*.log*" ! -name "*.jar*" \) -printNote: -path option/argument does not work with the version of find that i have. bash-3.2$ uname -a SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v (7 Replies)
Discussion started by: mohtashims
7 Replies

9. Shell Programming and Scripting

Exclude directories in FIND command

Can you please help tweak the below command to exclude all directories with the name "logs" and "tmp" find . -type f \( ! -name "*.tar*" ! -name "*.bkp*" \) -exec /usr/xpg4/bin/grep -i "user_1" /dev/null {} + >result.out bash-3.2$ uname -a SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v... (9 Replies)
Discussion started by: mohtashims
9 Replies

10. Shell Programming and Scripting

Find and exclude what is in file

Hello everyone, I try to find folders older than 3 years and display them, but excluding some directories, the below code does NOT exclude listed directories: find . -maxdepth 3 -mtime +1095 -type d -exec ls -l {} \; | grep -vFf oldExclude >> older oldExclude Folder1/ Folder2/... (7 Replies)
Discussion started by: Abu Rayane
7 Replies
Config::INI::Reader(3pm)				User Contributed Perl Documentation				  Config::INI::Reader(3pm)

NAME
Config::INI::Reader - a subclassable .ini-file parser VERSION
version 0.019 SYNOPSIS
If family.ini contains: admin = rjbs [rjbs] awesome = yes height = 5' 10" [mj] awesome = totally height = 23" Then when your program contains: my $hash = Config::INI::Reader->read_file('family.ini'); $hash will contain: { '_' => { admin => 'rjbs' }, rjbs => { awesome => 'yes', height => q{5' 10"}, }, mj => { awesome => 'totally', height => '23"', }, } DESCRIPTION
Config::INI::Reader is yet another config module implementing yet another slightly different take on the undeniably easy to read ".ini" file format. Its default behavior is quite similar to that of Config::Tiny, on which it is based. The chief difference is that Config::INI::Reader is designed to be subclassed to allow for side-effects and self-reconfiguration to occur during the course of reading its input. METHODS FOR READING CONFIG
These methods are all that most users will need: they read configuration from a source of input, then they return the data extracted from that input. There are three reader methods, "read_string", "read_file", and "read_handle". The first two are implemented in terms of the third. It iterates over lines in a file, calling methods on the reader when events occur. Those events are detailed below in the "METHODS FOR SUBCLASSING" section. All of the reader methods return an unblessed reference to a hash. All throw an exception when they encounter an error. read_file my $hash_ref = Config::INI::Reader->read_file($filename); Given a filename, this method returns a hashref of the contents of that file. read_string my $hash_ref = Config::INI::Reader->read_string($string); Given a string, this method returns a hashref of the contents of that string. read_handle my $hash_ref = Config::INI::Reader->read_handle($io_handle); Given an IO::Handle, this method returns a hashref of the contents of that handle. METHODS FOR SUBCLASSING
These are the methods you need to understand and possibly change when subclassing Config::INI::Reader to handle a different format of input. current_section my $section_name = $reader->current_section; This method returns the name of the current section. If no section has yet been set, it returns the result of calling the "starting_section" method. parse_section_header my $name = $reader->parse_section_header($line); Given a line of input, this method decides whether the line is a section-change declaration. If it is, it returns the name of the section to which to change. If the line is not a section-change, the method returns false. change_section $reader->change_section($section_name); This method is called whenever a section change occurs in the file. The default implementation is to change the current section into which data is being read and to initialize that section to an empty hashref. parse_value_assignment my ($name, $value) = $reader->parse_value_assignment($line); Given a line of input, this method decides whether the line is a property value assignment. If it is, it returns the name of the property and the value being assigned to it. If the line is not a property assignment, the method returns false. set_value $reader->set_value($name, $value); This method is called whenever an assignment occurs in the file. The default behavior is to change the value of the named property to the given value. starting_section my $section = Config::INI::Reader->starting_section; This method returns the name of the starting section. The default is: "_" can_ignore do_nothing if $reader->can_ignore($line) This method returns true if the given line of input is safe to ignore. The default implementation ignores lines that contain only whitespace or comments. preprocess_line $reader->preprocess_line($line); This method is called to preprocess each line after it's read but before it's parsed. The default implementation just strips inline comments. Alterations to the line are made in place. handle_unparsed_line $reader->handle_unparsed_line( $io, $line ); This method is called when the reader encounters a line that doesn't look like anything it recognizes. By default, it throws an exception. finalize $reader->finalize; This method is called when the reader has finished reading in every line of the file. new my $reader = Config::INI::Reader->new; This method returns a new reader. This generally does not need to be called by anything but the various "read_*" methods, which create a reader object only ephemerally. ORIGIN
Originaly derived from Config::Tiny, by Adam Kennedy. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2011-12-15 Config::INI::Reader(3pm)
All times are GMT -4. The time now is 04:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy