Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2006
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Running Grep Through SSH (screenshot)

    I am trying to run this line:
    grep -r Acyclovir / 2> /dev/null

    ------------------------------------------------------------------------------------------------------------------------------------------------------



    ------------------------------------------------------------------------------------------------------------------------------------------------------

    this is where I get stuck :\

    can anyone please help me, Im trying to remove spam on the site.
    Again sorry I dont know where to post this, please move it if its in the wrong place, sorry for any inconvenience to moderators if you have to move this please dont ban me

    ------------------------------------------------------------------------------------------------------------------------------------------------------

  • #2
    New Coder
    Join Date
    May 2007
    Location
    Manchester, UK
    Posts
    72
    Thanks
    0
    Thanked 2 Times in 2 Posts
    You need to appreciate that grep will open, read through, check for instances of 'Acyclovir', and report. It does this for every single file you have read permissions for on the whole server -- that will take a long time, and until such time as it's done it won't return you to the command shell, so you just have to be patient.

    If you don't want it to take so long then replace the single '/' with '~/', that should take a whole lot less time, but will only scan your home directory.

    You might be able to run it in the background;
    Code:
    echo "`grep -r Acyclovir / 2> /dev/null && echo 'SEARCH FINISHED'`" > ~/SEARCH_RESULT &
    That way you can leave it to search in the background, and can check up on SEARCH_RESULT in your home directory later.
    Every PHP programmer of any skill level should set error_reporting(E_ALL); at the top of their scripts or in their php.ini


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •