Questions tagged [find]

This tag has multiple meanings. Please DO NOT use this tag if you're just trying to find something.

find is:

  1. a filesystem search tool on various flavors of *nix,
  2. a filesystem search tool on various flavors of DOS and Windows,
  3. the name of a jQuery method,
  4. the name of a family of methods in ActiveRecord,
  5. a function in the C++ standard library,
  6. a method of strings in Python,
  7. a method of Matcher Class in Java.
  8. a method in many different NoSQL's to find documents in a collection.
11183 questions
3
votes
1 answer

MongoDB search in embedded array

I am trying to store all my written java files in a MongoDB and so far I've applied a schema like this (incomplete entry): { "_id" : ObjectId("52b861c230044fd08d6c27c4"), "interfaces" : [ { "methodInterfaces" : [ { …
Tommy Berg
  • 31
  • 1
3
votes
2 answers

Using find command to delete multiple extensions older than certaint time

I had a question using the "-o" option in find to find multiple extensions. find "DIRECTORY" -type f -name \*.jpg -o -name \*.html -mtime +95 In the above I want to delete all files of two extensions that are older than a certain time. By using -o…
user1490083
  • 361
  • 2
  • 7
  • 21
3
votes
1 answer

How to generate a MySQL IS NOT NULL condition in CakePHP?

I'm trying to get a subset of results as a virtualField for use in my view. I may even be way off on how I'm approaching this, but here's what I've done so far: I started with this question here: CakePHP virtualField find all not null which lead to …
Randy Hall
  • 7,716
  • 16
  • 73
  • 151
3
votes
3 answers

Filesystem speedup - 'find' command

I would like to speedup queries like: find root_dir -atime -5 - find files which were accessed less then five days ago. I think about storing filesystem hieratchy and files metadata in a db. Do you know any solution that can help ? Maybe there…
3
votes
2 answers

BASH: How to use patterns properly with find

I am desperately trying to write a pattern for find command, but it never works. I want to search for all *.txt and *.h files: find . -name "*(*.h|*.txt)" find . -name "(*.h|*.txt)" find . -name *(*.h|*.txt) find . -name "*\(*.h|*.txt\)" find .…
Mazyod
  • 22,319
  • 10
  • 92
  • 157
3
votes
1 answer

Using find command on in a Bash Script to find integers

I need to find and archive files with a certain file name e.g. ABC_000.jpg find ~/my-documents/ -iname "ABC_***.JPG" -type f -exec cp {} ~/my-documents/archive/ \; however I can not seem to find a way to limit the find function to find only 3…
WhereAreYouSyntax
  • 163
  • 2
  • 4
  • 13
3
votes
1 answer

Why "\b" doesn't work in the regex pattern of find?

I'm using the find command in Mac OS X 10.9, I tried commands like this: $ touch "a gre a" $ find -E . -iregex ".*\bgre\b.*" It looks that the find will not return this file named a gre a.. Does anyone have ideas about this? Thanks!
Hanfei Sun
  • 45,281
  • 39
  • 129
  • 237
3
votes
3 answers

Find And Replace in a TXT From CSV File

I'm trying to find words on a first column of a CSV or XLS file, and replace them with words in the second column of the CSV of XLS. I have made something like that but it doesn't work. Can you help me? For each line, the first column in a variable…
BigBlack
  • 163
  • 2
  • 12
3
votes
1 answer

collection findall in an array list

I am using groovy and I have a collection : person 1: age - 1, weight - 25 person 2: age - 2, weight - 20 person 3: age - 3, weight - 25 I need to find all persons whose age or weight is in the list of valid age/weight returned by a method…
user742102
  • 1,335
  • 8
  • 32
  • 51
3
votes
4 answers

How to check if a number comes before another in a List

How can I go about checking if an element comes before another in a list? For example: how can I check if 5 comes before 12 in a list: li = [1,2,3,7,4,5,10,8,9,12,11] Is there an built-in Python function that can allow me to do that?
user2891763
  • 413
  • 3
  • 7
  • 12
3
votes
3 answers

Why jQuery next can't find the next div?

I want to create a page for FAQs and used jQuery to show each answer. But it does not work. The format of each question-answer is like this:
Mohammad Saberi
  • 12,864
  • 27
  • 75
  • 127
3
votes
1 answer

difference between find . –name *.txt and find . –name "*.txt"

I want to know what is the difference between this two commands.. find . –name *.txt find . –name "*.txt" I run it in the system and cant find any difference, what does the sign " " do?
user2922456
  • 391
  • 4
  • 10
  • 24
3
votes
3 answers

Find and replace a portion of text in a field using MySQL

I have a table with a column containing text that include the following string: Where XYZ can be a random text such as…
Yori Smith
  • 80
  • 8
3
votes
3 answers

To extract multiple lines with find, trim lead and trail spaces

My previous question was to extract multiple lines from a text files, which is working fine now but it still needs some improve to trim leading and trailing(tricky part) whitespaces/tab spaces and from searching thru Stackoverflow i found many…
Double Quotes
  • 125
  • 1
  • 2
  • 11
3
votes
1 answer

Understanding find and vectors C++

I'm trying to understand this line of code vector::iterator it = find(list_vector.begin(), list_vector.end(), 5) where I have vector list_vector; declared before hand. What does the 5 do? What does it return? Does it return the 5 if it…
Jake Smith
  • 189
  • 2
  • 2
  • 11