Quote:
|
Originally Posted by Helmi
hi all,
i was given by my supervisor a task to search for scripts which contain oracle sqlplus i.e "myusername/mypasswd @myDB" in every /home/userfolder, which are, all the scripts made by different user. I've done some find command to search string for sqlplus, but it may up too long to respond. And it was searching, some directories denied the permission to read the files. May be it was the admin folder(right?i new to UNIX). therefore, i try to search some example in this forum but, unlucky to find one similarly. I need help to clear me up:
|
use find with xargs
find . -name '*.*' -print | xargs grep -il 'searchpattern'
if enough permission is not available then use the following form
find . -name '*.*' -print 2>/dev/null | xargs grep -il 'searchpattern'
Quote:
|
1) i log on as normal user only, so, it is possible to editing scripts like i mention above? what about that sort of "permission"?should asking for super user id or not?
|
write permission should be available to edit the scripts
root permission is not required as such, it is enough if you have the perms of the owner or write perm to the group atleast
Quote:
2) how am i going to seek for oracle sqlplus scripts which have the "myusername/mypasswd @myDB" in every sh scripts,perl etc in every user directories. And if it found it, it is enable to modified?
3) is there any example/testing sed scripts which i seem maybe would help for
the task?
|
Sorry am not clear with this !