cPanel hosting question

12 replies
Is there a way, to search through ALL of the files that I have on a cPanel host for a text string?

Maybe some sort of script or something?

Thanks...

Be Well!
ECS Dave
#cpanel #hosting #question
  • Profile picture of the author TristanPerry
    I'm 99% sure that there's no built-in feature to do this. And to be honest, unless you have a small number of files I'd be a little dubious about running such a script server-side (well, if you're on a shared environment that is)

    I'd personally suggest that you FTP the files to your computer, and then use a software program on your computer to carry out the search (UltraEdit has a very powerful search tool; they have a trial too. Might be a little overkill for your needs, but it is a good tool)
    Signature
    Plagiarism Guard - Protect Against Content Theft
    {{ DiscussionBoard.errors[2570252].message }}
  • Profile picture of the author ECS Dave
    Thanks TristanPerry for replying...

    Darn shame there appears to not be a way to do this server-side.

    I can still hope someone might chime in? Downloading all of it would be such a "pain"...

    Be Well!
    ECS Dave
    {{ DiscussionBoard.errors[2570504].message }}
  • Grep is the best solution, if you have root level access.
    It may take awhile to try and learn regex(regular expression), but comes in handy alot!
    {{ DiscussionBoard.errors[2570836].message }}
    • Profile picture of the author mojojuju
      Originally Posted by Cash Money Hosting View Post

      Grep is the best solution, if you have root level access.
      He's not going to need root access to use grep.
      Signature

      :)

      {{ DiscussionBoard.errors[2570898].message }}
  • Profile picture of the author seasoned
    That ***********ANY ONE********** would say there is no such command, etc... is just CRAZY! It is part of POSIX and decades old. UNIX had find and grep before M/S windows existed, before DOS existed, before IBM made the PC and before microsoft was even created! OH, and before APPLE ever existed! Before IBM, SUN, HP EVER made a UNIX machine. They existed not much after UNIX or CP/M were created.

    BTW I have interviewed thousands of people and about 80% queried knew about grep EVEN if they knew little else!

    UNIX, and thus Linux, has a LOT of capability already built into it. You can use find xargs, and even grep to selectively limit search resources. It would be just like the windows search only it uses less resources, has more features, is faster, etc.... Oh, and root access is needed ONLY if you need root access to access the files searched.

    Steve
    {{ DiscussionBoard.errors[2570990].message }}
    • Profile picture of the author ECS Dave
      Originally Posted by seasoned View Post

      They ***********ANY ONE********** would say there is no such command, etc... is just CRAZY!

      <snip>

      UNIX, and thus Linux, has a LOT of capability already built into it. You can use find xargs, and even grep to selectively limit search resources. It would be just like the windows search only it uses less resources, has more features, is faster, etc.... Oh, and root access is needed ONLY if you need root access to access the files searched.

      Steve
      Say if my host won't do it, is there a way to maybe "buy" a php script that accepts from me, the search string, and possibly with a dropdown for the folders to search in? Maybe even with some popular/useful optiions boxes to check or uncheck for said options?

      BTW - Hiya's Steve, ltns...

      Be Well!
      ECS Dave
      {{ DiscussionBoard.errors[2571005].message }}
      • Profile picture of the author seasoned
        Originally Posted by ECS Dave View Post

        Say if my host won't do it, is there a way to maybe "buy" a php script that accepts from me, the search string, and possibly with a dropdown for the folders to search in? Maybe even with some popular/useful optiions boxes to check or uncheck for said options?

        BTW - Hiya's Steve, ltns...

        Be Well!
        ECS Dave
        Well, I am talking about doing it yourself. I never considered that people wouldn't be willing to do that. I guess I should have, considering.

        steve
        {{ DiscussionBoard.errors[2572207].message }}
  • Profile picture of the author KirkMcD
    You know, you could have just downloaded the entire site by now to your pc and have done the search locally.

    You could always run the grep as a cron job if you wanted and send the results to your email.
    {{ DiscussionBoard.errors[2571991].message }}
    • Profile picture of the author seasoned
      Originally Posted by KirkMcD View Post

      You know, you could have just downloaded the entire site by now to your pc and have done the search locally.

      You could always run the grep as a cron job if you wanted and send the results to your email.
      How the ****HELL**** would YOU know!?!? I once tried to download my server onto my laptop, for test and backup! I GREATLY cut down things, PARTIALLY using grep, and compressed archives, and it STILL took DAYS! It IS small, but STILL many GIGABYTES! And what of decompressing? AND, if I want to search that stuff on WINDOWS!?!?!?!? IT isn't fast either. The top speed at 10bt is realistically about 900,000 SO 1GB is 1112 seconds or 18 minutes. 100GB is 1800 minutes or 30 hours. And how many here have really transferred things that fast consistantly?

      The same goes with Email. Suppose you have more than 2MB of data that matches?

      Steve
      {{ DiscussionBoard.errors[2572239].message }}

Trending Topics