...

View Full Version : Running Grep Through SSH (screenshot)



jream
05-29-2007, 05:51 PM
I am trying to run this line:
grep -r Acyclovir / 2> /dev/null

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

http://www.jream.com/upload/img/sshputty.jpg

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

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 :(

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

Ahri
05-29-2007, 08:43 PM
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;

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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum