03-30-2012
Quote:
Originally Posted by
Yeaboem
maybe I'm missing your point, but if you don't want to recurse, then don't use 'find'. If your favorite shell's filename expansion is too weak to let you use complex regular expressions, then use 'echo *' or 'ls' and pipe to your favorite 'grep'?
Hi,
Thanks for your response.
I need to use find 'coz I need to work on files that are x-number of day's old? Can I achieve the same with just using echo, ls and pipe?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I need to perform a non-recursive find in Unix. Sounds simple, but it doesn't actually work. The command ALWAYS searches through the subdirectories.
Any ideas? I am on DEC Unix :-( (3 Replies)
Discussion started by: christallott
3 Replies
2. UNIX for Dummies Questions & Answers
Hello, I am trying to search a directory for all files matching "G*" without looking in sub-directories "success" and "error". I've searched this forum and found the following syntax, but can't make it work:
find . \( ! -name success -prune -name error -prune \) -type f -name "G*"
Have... (6 Replies)
Discussion started by: alexkav
6 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone,
I'm using a recursive find (you know the type, find . -name qwert*) to find a set of files. However, because I'm new to the system and there is not much documentation about these particular files I'm trying to find them using this recursive find.
I started off at the location... (3 Replies)
Discussion started by: spanish_tony
3 Replies
4. Shell Programming and Scripting
I HAVE A TEXT FILE CONTAINING THE VALUES
1.CPP
2.CPP
3.CPP
4.CPP
5.CPP
6.CPP
I WANT TO TAKE EACH .CPP AND USE THE FIND COMMAND TO FIND THE LATEST VERSION OF THE FOLDER IN WHICH IT IS PRESENT.
HOW DO I IMPLEMENT IT IN A WHILE LOOP
I TRIED SOMETHING LIKE THIS
WHILE
CAT... (3 Replies)
Discussion started by: ultimatix
3 Replies
5. UNIX for Advanced & Expert Users
Hi,
I have question is related to find command. I want to find command should search in current folder only not recursive mode(sub-folders).
I found a one way of,
find . \( -name success -prune \) -o -name "Rajini*"
How ever, my current folder is having lots sub-folders and am not... (7 Replies)
Discussion started by: Nagapandi
7 Replies
6. UNIX for Advanced & Expert Users
I was working on a shell script and found that the find command took too long, especially when I had to execute it multiple times. After some thought and research I came up with two functions.
fileScan()
filescan will cd into a directory and perform any operations you would like from within... (8 Replies)
Discussion started by: newreverie
8 Replies
7. Shell Programming and Scripting
Tricky one:
I want to do several things all at once to blow away a directory (rm -rf <dir>)
1) I want to find all files recursively that have a specific file extension (.ver) for example.
2) Then in that file, I want to grep for an expression ( "sp2" ) for example.
3) Then I want to... (1 Reply)
Discussion started by: jvsrvcs
1 Replies
8. UNIX for Dummies Questions & Answers
Hello Unix Gurus,
I am using the following find commands:
1)
find Input_Path -name '*.' -exec mv -f
{} Outputpath \;
2)
find Inputpath -name '*.' -exec cp
{} Outputpath \;
3)
find Somepath -name '*.'
Now the problem is my Unix version does not support maxdepth Option for find... (7 Replies)
Discussion started by: pchegoor
7 Replies
9. UNIX for Dummies Questions & Answers
Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only?
Thanks in advance. (6 Replies)
Discussion started by: jimbojames
6 Replies
10. UNIX for Dummies Questions & Answers
Hi All
I have a requirement to find the file that are most latest to be modified in each directory. Can somebody help with the command please?
E.g of the problem.
The directory A is having sub directory which are having subdirectory an so on.
I need a command which will find the... (2 Replies)
Discussion started by: sudeep.id
2 Replies
LEARN ABOUT DEBIAN
findfiles
findfiles(1) PythonCard Developers findfiles(1)
NAME
findfiles - Utility to locate files containing specific content
SYNOPSIS
findfiles [switches]
DESCRIPTION
Very often when you are programming in any programming or scripting language, you want to find out how a particular function works or
whether a particular property is settable, or any of a number of other questions. In many cases, you can find the answers to your questions
by looking at the source code of the application or tool you're using. This is sometimes referred to as "code shopping," particularly when
what you really hope to find is a method that does exactly what you want to do. The PythonCard findfiles tool is designed to support you
in these efforts.
Type in a string for which to search, tell findfiles the directories (yes, you can have more than one) in which to search for files con-
taining that string, and send findfiles off to locate files with that specific content. Scroll through the list of files, each with a line
reproducing part of the located line for each occurrence in the file, find the one you think is what you are looking for, and double-click
the line. Voila! The PythonCard codeEditor tool opens and scrolls instantly to the line you've selected.
SWITCHES
-p Show property editor
-m Show message watcher
-l Enable logging
-s Show shell
-m Show namespace
-d Show debug menu
REGULAR EXPRESSIONS
The findfiles utility uses classic Unix grep (regular expression) searches.
The grep utility uses a technique called regular expression matching to locate information. In regular expressions, some characters have a
special meaning. If you want to search for any of these special characters in the strings you supply in findfiles, you'll have to escape
them by preceding them with a backward slash () character.
While there are many such characters in regular expressions, the ones with which you will need to be most careful are: question mark (?),
asterisk (*), addition/concatenation operator (+), pipe or vertical bar (|), caret (^) and dollar sign ($). To search for a dollar sign in
the target directories, for example, put "$" into the search field. (Putting in a $ by itself will crash findfiles fairly reliably.)
On a Debian system, you can see the manpages for grep(1) or regex(7) for more information on grep and regular expressions.
NOTES
The findfiles utility also provides additional functionality that is not discussed in this manpage, because it is somewhat difficult to
completely describe usage of a GUI program in a text-based manpage. For more detailed usage instructions or for more information on the
PythonCard GUI framework in general, you should install the pythoncard-doc package and take a look at the various walk-throughs, tutorials
and samples included with it.
Once the pythoncard-doc package is installed, the documentation is installed to /usr/share/doc/pythoncard-doc, and is also available via
Debian's doc-base infrastructure - find it in the Devel section using dwww(1), doc-central(1) or dhelp(1).
If you would rather not install the pythoncard-doc package, you can find essentially the same information on the PythonCard website:
http://pythoncard.sourceforge.net
BUGS
Although it is considered to be stable, this is still development-level software.
Please report bugs in this or any PythonCard component to the Debian Bug Tracking system using reportbug(1).
AUTHOR
This manpage was written by Kenneth J. Pronovici <pronovic@debian.org>, for use by the Debian project. Content was based on previously-
existing PythonCard documentation in other forms.
SEE ALSO
codeEditor(1), resourceEditor(1),
PythonCard GUI Framework August 2003 findfiles(1)