Knowledgebase

Bash script error (No such file or directory/find)

Posted by ZKuJoe, 07-05-2009, 11:25 AM
Here's the code I'm using (was working on my old server before migrating to the new one: Here is the output: I've reinstalled findutils with no luck, I verified the location of find and it is correct. Any ideas why this would work on the old server and not the new one since they are pretty much identical in terms of both hardware and software? Last edited by ZKuJoe; 07-05-2009 at 11:32 AM.

Posted by zacharooni, 07-05-2009, 11:32 AM
Paste output of: /bin/bash -x yourscript.sh

Posted by ZKuJoe, 07-05-2009, 11:35 AM
bin/bash -x ifscanphp.sh + FINDBIN=$'/usr/bin/find\r' + EGREPBIN=$'/bin/egrep\r' ' BADWORDS='warez|proxy|hacks ' echo ' PHP SCAN STARTED PHP SCAN STARTED + echo $'++++++++++++++++++++++++++++++++++++++++++++++++++++\r' ++++++++++++++++++++++++++++++++++++++++++++++++++++ ' '{}' ';bin/find\r' /home/*/public_html/ -iname '*.php' -type f -exec $'/bin/egrep\r' -i -H 'warez|proxy|hacks : No such file or directorybin/find + echo $'++++++++++++++++++++++++++++++++++++++++++++++++++++\r' ++++++++++++++++++++++++++++++++++++++++++++++++++++ ' echo ' PHP SCAN ENDED PHP SCAN ENDED Last edited by ZKuJoe; 07-05-2009 at 11:43 AM.

Posted by Beast5, 07-05-2009, 11:39 AM
first of all make sure your system had findutils http://www.gnu.org/software/findutils/ type: # which find if you see a correct path - you can put insted of this FINDBIN=/usr/bin/find this: FINDBIN=`which find`

Posted by ZKuJoe, 07-05-2009, 11:43 AM
I did that, but now I'm getting the following:

Posted by zacharooni, 07-05-2009, 11:48 AM
Try doing this, I noticed some \r's

Posted by ZKuJoe, 07-05-2009, 12:39 PM
Looks like it worked. Thanks!



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
ServerForce.Net (Views: 618)
Webnx down (Views: 601)


Language:

Client Login

Email

Password

Remember Me

Search