Tuesday, June 11, 2013

Re: [LINUX_Newbies] Grep questions

 

Mi Jun 12 07:42:43 2013
Good morning
Thank You for help.

Am 09.06.2013 00:37, schrieb Trevor Pearson:> On 07/06/13 02:46,
Subramani wrote:
> >
> >
> > Cameron,
> >
> > Yes, Its necessary to login as a ROOT user. Its a privileges issues.
> >
> > Mani
>
> It is necessary to have superuser permissions, if you want to grep
> system files and other users files. Many files under /usr and many
> other directories are readable by any user and do not need 'root'
> permissions.
>
*
Question:
If I want to search for my self-written files,
I do not have to be in Ubuntu
a superuser.
But If I want to search Linuxfiles
then I have to be the superuser?

> The best approach is to use 'sudo <command>' since then only the grep
> will have 'root' permissions rather than login as root.
>
> Consider using 'find' and locate to identify files to pass to grep as
> they operate much quicker and greping an entire machine will be slow as
> you will scan tens of thousands of files.
*
grep is more slow
but have more opportunities?

*
Does

grep -r name* > resu.txt

show
files like namemyname.txt
and also all directories like

nameallfiles/

Regards
Sophie

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (10)
Recent Activity:
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.
.

__,_._,___

No comments:

Post a Comment