find

How do I apply a shell command to many files in nested (and poorly escaped) subdirectories?

Hi! I'm trying to do something like the following: for file in `find . *.foo` do somecommand $file done But the command isn't working because $file is very odd. Because my directory tree has crappy file names (including spaces), I need to escape the find command. But none of the obvious escapes seem to work: -ls gives me the spa...

How can I exclude all "permission denied"-messages from "find ."?

I need to hide all "permission denied"-messages from: find . > files_and_folders I am experimenting when such message arises. I need to gather all folders and files, to which it does not arise. Is it possible to direct the permission levels to the files_and_folders-file? How can I hide the errors at the same time? ...

Unable to find a directory when I know just its name by Find?

I am trying to find the directory called macports by Find. I do not know where it is in my computer. I have tried unsuccessfully find --mindepth 777 macports How can you find the directory? ...

HTML Traverse and Find Best Practices

Hey I was thinking about making some crawlers so that I can get an URL and traverse through the html and just get certain things I might need/want. I was thinking about using Php + xPath but I'm not sure that might be the best way. What do you guys think? Are there any best practices, recommendations, or anything else? ...

Is there a better, 3rd party "Find" / "Search" add-on for Visual Studio 2008?

I can't stand Visual Studio 2008's "Find" or "Find and replace" functionality, does anyone know of a better 3rd party solution that integrates into visual studio? At this point, I'd gladly take any "Find" utility, visual studio integration or not. Some of the things VS.net 08 wont do that I'd like to do: let you specify the file type...

Traverse xml structure to determine if a certain text node exists

Alright I have an xml document that looks something like this: <xml> <list> <partner> <name>Some Name</name> <status>active</status> <id>0</id> </partner> <partner> <name>Another Name</name> <status>active</status> <id>1</id> </partner> </list> </xml> I ...

Visual Studio Search in Selected Folders or File Types Only

Is there a way to limit the visual studio search (find and replace window) to certain file types or folders? ...

How to use UNIX find to find (file1 OR file2)?

In the bash command line, I want to find all files that are named foo or bar. I tried this: find . -name "foo\|bar" but that doesn't work. What's the right syntax? ...

Unable to find files which have been in the folder one minute in Mac's Zsh

I need to find files which have been in the folder Wastebasket exactly one minute. The files have been moved all over my computer to the folder. I run the following unsuccessfully find -atime n1m . I get all my files in the directory by the command, even ones which I just created. It seems that the option -atime is not correct. How ...

Clean way to find ActiveRecord objects by id in the order specified

I want to obtain an array of ActiveRecord objects given an array of ids. I assumed that Object.find([5,2,3]) Would return an array with object 5, object 2, then object 3 in that order, but instead I get an array ordered as object 2, object 3 and then object 5. The ActiveRecord Base find method API mentions that you shouldn't expect ...

Visual Studio Find and Replace Variables

I am trying to replace a two letter state abbreviation with text then the abbreviation. Eventually I want to find and replace the rest. How do I capture the value found? .... I tried \1 and {1} AL 32.2679134368897 -86.5251510620117 AR 35.2315113544464 -92.2926173210144 AZ 33.3440766538127 -111.955985217148 CO 39.709863142533...

Renaming a series of files

Trying to rename a series of files on a linux server. Finding the files I want is easy: find . -type f -wholename \*.mbox Of course, being mbox files, some of them have spaces in the names, so it becomes: find . -type f -wholename \*.mbox -print0 I'm piping to xargs so that I can rename the files: find . -type f -wholename \*.mbo...

Set variable to result of "Find" in batch-file

I would like to set a variable based on the number of lines in a file that contain a give string. Something like: set isComplete = 0 %isComplete% = find /c /i "Transfer Complete" "C:\ftp.LOG" IF %isComplete% > 0 ECHO "Success" ELSE ECHO "Failure" Or: set isComplete = 0 find /c /i "Transfer Complete" "C:\ftp.LOG" | %isComplete% IF %i...

Seeking good examples of Find and Replace user interfaces in text editors and IDEs

I'm working on a Windows application with an integrated text editor, like an IDE. The current Find and Replace features use the standard Windows dialogs, which are showing their age and aren't very powerful. What great examples do you know of Find and Replace functionality, in text editors or IDEs? I'm looking for inspiration for look...

How do I create a Find form for a RichTextBox?

I would want to search up, down, and match case if possible. Even links to get me started would be appreciated. ...

Find an object in a generic list with Find method

class Cache { int sizeOfCache;//no of RssFeedDocument private List<RssFeedDocument> listOfRssFeedDocument = null; } i want to find a object in this generic list in class based upon RssFeedDocument 's property FeedId. ...

Best way to Find which cell of string array contins text

I have a block of text that im taking from a Gedcom (Here and Here) File The text is flat and basically broken into "nodes" I am splitting each node on the \r char and thus subdividing it into each of its parts( amount of "lines" can vary) I know the 0 address will always be the ID but after that everything can be anywhere so i want ...

List Element without iteration

Hello everybody, I want to know how to find an element in list without iteration ...

How to pipe list of files returned by find command to cat to view all the files

Hi, I am doing a find and then getting a list of files. how do I pipe it to another utility like cat (so that cat displays the contents of all those files) and basically need to grep something from these files. ...

Unable to find the program >> in Mac

I want to search the program ">>" that is by which you append to a file. I run the code unsuccessfully in Mac find . -print0 | xargs -0 grep " >> " I get too many results to find the correct app. The program is not among other teletypes at /bin. How can you find the program ">>"? ...