Search file system for files by text content

Forum Forums New users New Users and General Questions Search file system for files by text content

  • This topic has 33 replies, 6 voices, and was last updated Jan 24-8:05 am by BobC.
Viewing 15 posts - 16 through 30 (of 34 total)
  • Author
    Posts
  • #97811
    Moderator
    BobC
      Helpful
      Up
      0
      ::

      Searchmonkey found “geoblocked” in the .odt files without any help. It was quick, too.

      Attachments:
      #97864
      Member
      andfree
        Helpful
        Up
        0
        ::

        Thank you all for the info.

        I’m not sure if anything I installed in my computer added any functionality to searchmonkey, but it does search files by name and contents, including text files, .pdf, odt, doc and docx !

        I don’t think so. About an odt file, I wrote earlier:

        zzzFM also doesn’t find it. Searchmonkey does.

        It finds an odt file, but then it crashes

        It also finds pdf & other files, but, as I wrote, it crashes to a “Segmentation fault” when I do a search to the whole of the “Documents” folder (obviously, this folder contains something that causes this effect). If overlooking it, Searchmonkey seems to be the simplest way for a search to the totality of the files.

        Please, ignore the attachment, it was just a test to see if I can attach a txt file.

        • This reply was modified 3 months, 2 weeks ago by andfree.
        • This reply was modified 3 months, 2 weeks ago by andfree.
        • This reply was modified 3 months, 2 weeks ago by andfree.
        Attachments:
        #97871
        Moderator
        BobC
          Helpful
          Up
          0
          ::

          run searchmonkey from a terminal and resize the windows so you can see both the output in the terminal and the searchmonkey window. Show us the search criteria by posting a screenshot before you click start. When does the error occur (immediately when you click search, after some items appear, after lots of items appear, at the end of the search, when you clink on a file the serch found?). Then do another screen print when the error occurs.

          What kind of machine do you have?
          Does it have enough memory?
          Is it reasonably fast?
          How many files are in the area you searched?
          Post your full inxi output as a .txt file attachment to the post so we can see what you have. I searched 1.5TB with millions of files and I didn’t get any errors.

          #97873
          Member
          andfree
            Helpful
            Up
            0
            ::

            Thanks for your help. The search criteria were just these ones:

            Containing: garden
            Folders: /home/user/Documents/
            Recurse folders

            After crashing, the Searchmonkey window disappears & the terminal shows a “Segmentation fault”, as I have already posted.
            But I don’t think anymore that a specific file is the culprit. I searched each subfolder separately several times and it crashed only two times, about two different subfolders, but when I repeated the search to these two subfolders, no crash happened again. I find it more possible that it has to do with the system specs.

            Again, I can’t attach the full inxi output. I post it here:

            • This reply was modified 3 months, 2 weeks ago by andfree.
            • This reply was modified 3 months, 2 weeks ago by andfree.
            • This reply was modified 3 months, 2 weeks ago by andfree.
            #97877
            Moderator
            BobC
              Helpful
              Up
              0
              ::

              andfree, please post screenshots of the searchmonkey screens before clicking and when halted like I asked above so we can see exactly what was in the fields that caused it to halt. I think pressing the PrtScr or Print key should run the screenshot program.

              To upload the full-inxi-output file, first rename it to full-inxi-output.txt and then the site should allow you to upload it.

              #97880
              Moderator
              BobC
                Helpful
                Up
                0
                ::

                How big is your Swap?

                I see it is 32 bit and only has 1 gb of memory. If you can, try the same thing on a big, fast 64 bit machine to see if it still gets the error.

                Maybe someone else can help figure out the segmentation fault error.

                Look at my searchmonkey screenshot and check each field to see if you have similar syntax. Obviously I can’t possibly recreate your error if I don’t run the exact same search.

                #97881
                Member
                andfree
                  Helpful
                  Up
                  0
                  ::

                  I attach the screenshot before the search. After the crash (if it happens), there’s nothing to attach, because, as I wrote, the window disappears.

                  #97884
                  Member
                  andfree
                    Helpful
                    Up
                    0
                    ::

                    How big is your Swap?

                    See the attachment.

                    I see it is 32 bit and only has 1 gb of memory. If you can, try the same thing on a big, fast 64 bit machine to see if it still gets the error.

                    Unfortunately, I use only old, 32 bit machines, and the other ones have only 512MB of RAM.

                    Look at my searchmonkey screenshot and check each field to see if you have similar syntax.

                    As you can see in my previous attachment, I don’t specify the “Files” field.

                    #97889
                    Moderator
                    BobC
                      Helpful
                      Up
                      0
                      ::

                      Ok, It is a bug in the program and it happens if you use regular expression search without specifying the filename. https://sourceforge.net/p/searchmonkey/bugs/20/

                      I suggest using Wildcard search instead. See pics below, you need to go to Options tab and change searches to Wildcard instead of Regular expressions, then go to Settings >> Preferences >> System tab and click Save now.

                      Then I put an asterik in the Files field and my string in the Containing field, and specify whatever folders.

                      This worked on the Basic tab as well as the Advanced tab searches.

                      The bug was reported in 2019 it looks, but was never fixed, and I can’t tell if the author has been maintaining it since then.

                      I am running 0.8.3 GTK version. I might have compiled it myself, I forget. What version are you running?

                      • This reply was modified 3 months, 2 weeks ago by BobC. Reason: added link to bug issue
                      #97960
                      Member
                      andfree
                        Helpful
                        Up
                        0
                        ::

                        Many thanks for your efforts.

                        I am running 0.8.3 GTK version (…) What version are you running?

                        The same one.

                        change searches to Wildcard instead of Regular expressions

                        put an asterik in the Files field

                        All done, but, unfortunately, it crashes again, on both the Basic & the Advanced tab searches, at the same point of the progress. I tend to believe that insufficient memory is the cause.

                        #97966
                        Member
                        Xunzi_23
                          Helpful
                          Up
                          0
                          ::

                          On a memory strapped system swap space is critical.

                          Did you ensure you have that setup correctly.

                          • This reply was modified 3 months, 2 weeks ago by Xunzi_23.
                          #97968
                          Member
                          andfree
                            Helpful
                            Up
                            0
                            ::

                            On a memory strapped system swap space is critical.

                            Did you ensure you have that setup correctly.

                            Thank you for helping me. How can I ensure it? Does the info I have attached to my #97884 post help to this?

                            #97975
                            Moderator
                            BobC
                              Helpful
                              Up
                              0
                              ::

                              I don’t know if swap is the problem. When you ran the inxi you attached it wasn’t being used. But we don’t know if the search was running near the point of failure then. Increasing the swap size would require reducing the size of the main partition first.

                              PS: I wonder if creating a larger swap FILE on your main partition might be a possibility? I’ve never tried THAT.

                              You might be a candidate for zram, given your 1gb memory size.

                              To know if you are running out of swap or memory, you would need to monitor (run htop in a window) memory and swap usage while running the search.

                              Maybe try searching a smaller area or restrict the types of files searched? That might tell you if the problem is related to the size of the search.

                              If all else fails due to lack of resources, I guess you need to use “budget” searching methods… One thing it does teach is that using fancy file formats instead of simpler text ones has a big price.

                              • This reply was modified 3 months, 2 weeks ago by BobC.
                              • This reply was modified 3 months, 2 weeks ago by BobC.
                              #97979
                              Member
                              andfree
                                Helpful
                                Up
                                0
                                ::

                                Thanks for the reply.

                                To know if you are running out of swap or memory, you would need to monitor (run htop in a window) memory and swap usage while running the search.

                                Unfortunately, I see nothing strange before crash.

                                Maybe try searching a smaller area or restrict the types of files searched? That might tell you if the problem is related to the size of the search.

                                As I wrote in my #97873 post:

                                I searched each subfolder separately several times and it crashed only two times, about two different subfolders, but when I repeated the search to these two subfolders, no crash happened again.

                                This was that made me think that insufficient memory and not a “bad” file causes the problem.

                                #97987
                                Moderator
                                BobC
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Are you sure you made the same changes to your settings that I made? I was also crashing with “segmentation fault”.

                                  My best suggestion at this point is for you to double check your settings against the pics I posted for wildcard search which stopped the crashing on mine, and post screenshots of the same screens so we can double check them.

                                  If not, it is possible the problem is related to 32 bit or something else, but that doesn’t seem likely to me.

                                Viewing 15 posts - 16 through 30 (of 34 total)
                                • You must be logged in to reply to this topic.