Sponsored Content
Top Forums Shell Programming and Scripting Find and move command with exec Post 302761111 by jonnyd on Friday 25th of January 2013 05:52:20 AM
Old 01-25-2013
brilliant thnx!
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find command exec error

Hi All, i am writing a shell script in korn shell which deletes all the files in a directory once in every 10DAYS. the directory has different format files. the script has something like this; cd /home/data/pavi echo "Please Enter the Number of Days to search for" read DAYS... (2 Replies)
Discussion started by: pavan_test
2 Replies

2. UNIX for Advanced & Expert Users

Find command with prune and exec

Hi, I'm using the following command to get a list of files on the system. find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \; however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work... (1 Reply)
Discussion started by: Sebarry
1 Replies

3. UNIX for Dummies Questions & Answers

Find command with prune and exec options

Hi, I'm using the following command to get a list of files on the system. find /releases -type f -exec ls -l > /home/sebarry/list.txt '{}' \; however, its searching a directory I don't want it to search so I know I have to use prune but I don't seem to be able to get prune and exec to work... (2 Replies)
Discussion started by: Sebarry
2 Replies

4. Shell Programming and Scripting

find command with -exec

Hi People, I have a directory full of compressed files (.Z extention) In many of these files there is a string pattern (3800078163033) I want to find all file names which contain this string in their text. Regards, Abhishek (2 Replies)
Discussion started by: max29583
2 Replies

5. Shell Programming and Scripting

How to get the exit code of -exec in the find command

Hi I have a little problem with the find command in a script that I'm writing. The script should check if there are some files younger than 100 seconds and then syncronise them with rsync. My find command: find -type f -cmin -100 -exec rsync -a --delete directory1/ directory2/ When I... (8 Replies)
Discussion started by: oku
8 Replies

6. Shell Programming and Scripting

find command to use multiple -exec options

Hello All, Is there a way to make exec do a couple of operations on a single input from find? For example, find . -type d -exec ls -l "{}" ";" I would like to give the result of each "ls -l" in the above to a wc. Is that possible? I want to ls -l | wc -l inside exec. How do I... (1 Reply)
Discussion started by: prasanna1157
1 Replies

7. Shell Programming and Scripting

find command with -exec

Hi all, Please could someone help with the following command requirement. I basically need to find files NEWER than a given file and order the result on time. My attempt so far is as follows: find . -newer <file_name> -exec ls -lrt {} ;\ But I dont seem to get the right result... (12 Replies)
Discussion started by: jonnyd
12 Replies

8. UNIX for Dummies Questions & Answers

What does the '\' in find -exec command

Hi, I have two scripts that remove files. One works fine and is coded find -name "syst*" -mtime +1 -exec rm {} \; The other is almost the same - only thing missing is the '\'. On that script though I keep getting: rm syst1202.file ? etc Does the \ make that difference or is it a... (3 Replies)
Discussion started by: Grueben
3 Replies

9. Shell Programming and Scripting

Linux find command seems to not transmit all the result to the '-exec command'

Hello. From a script, a command for a test is use : find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc' Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
Plucene(3pm)						User Contributed Perl Documentation					      Plucene(3pm)

NAME
Plucene - A Perl port of the Lucene search engine SYNOPSIS
Create Documents by adding Fields: my $doc = Plucene::Document->new; $doc->add(Plucene::Document::Field->Text(content => $content)); $doc->add(Plucene::Document::Field->Text(author => "Your Name")); Choose Your Analyser and add documents to an Index Writer my $analyzer = Plucene::Analysis::SimpleAnalyzer->new(); my $writer = Plucene::Index::Writer->new("my_index", $analyzer, 1); $writer->add_document($doc); undef $writer; # close Search by building a Query my $parser = Plucene::QueryParser->new({ analyzer => Plucene::Analysis::SimpleAnalyzer->new(), default => "text" # Default field for non-specified queries }); my $query = $parser->parse('author:"Your Name"'); Then pass the Query to an IndexSearcher and collect hits my $searcher = Plucene::Search::IndexSearcher->new("my_index"); my @docs; my $hc = Plucene::Search::HitCollector->new(collect => sub { my ($self, $doc, $score) = @_; push @docs, $searcher->doc($doc); }); $searcher->search_hc($query => $hc); DESCRIPTION
Plucene is a fully-featured and highly customizable search engine toolkit based on the Lucene API. (<http://jakarta.apache.org/lucene>) It is not, in and of itself, a functional search engine - you are expected to subclass and tie all the pieces together to suit your own needs. The synopsis above gives a rough indication of how to use the engine in simple cases. See Plucene::Simple for one example of tying it all together. The tests shipped with Plucene provide a variety of other examples of how use this. EXTENSIONS
Plucene comes shipped with some default Analyzers. However it is expected that users will want to create Analyzers to meet their own needs. To avoid namespace corruption, anyone releasing such Analyzers to CPAN (which is encouraged!) should place them in the namespace Plucene::Plugin::Analyzer::. DOCUMENTATION
Although most of the Perl modules should be well documented, the Perl API mirrors Lucene's to such an extent that reading Lucene's documentation will give you a good idea of how to do more advanced stuff with Plucene. See particularly the ONJava articles <http://www.onjava.com/pub/a/onjava/2003/01/15/lucene.html> and <http://www.onjava.com/pub/a/onjava/2003/03/05/lucene.html>. These are brilliant introductions to the concepts surrounding Lucene, how it works, and how to extend it. COMPATIBILITY
For the most part Lucene and Plucene indexes are created in the same manner. However, due to current implementation details, the indexes will generally not be compatible. It should theoretically be possible to convert index files in either direction between Plucene and Lucene, but no tools are currently provided to do so. As Plucene is still undergoing development, we cannot guarantee index format compatibility across releases. If you're using Plucene in production code, you need to ensure that you can recreate the indexes. MISSING FEATURES
The following features have not yet been fully implemented: o Wildcard searches o Range searches MAILING LIST
Bug reports, patches, queries, discussion etc should be addressed to the mailing list. More information on the list can be found at: <http://www.kasei.com/mailman/listinfo/plucene> AUTHORS
Initially ported by Simon Cozens and Marc Kerr. Currently maintained by Tony Bowden and Marty Pauley. Original Java Lucene by Doug Cutting and others. THANKS
The initial development and ongoing maintenance of Plucene has been funded and supported by Kasei <http://www.kasei.com/> LICENSE
This software is licensed under the same terms as Perl itself. perl v5.12.4 2011-08-14 Plucene(3pm)
All times are GMT -4. The time now is 10:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy