Re: Faster Searching !

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2005-02-06 at 22:23 -0500, fly over wrote:
> Hi Guruz ,
> 
> I want to ask about the fastest searching command as i am using to search SUID/GUID files in / directory . script given as:
> 
>         ls -l /usr/bin | awk '/^-.....[s]/ { print $3, $9 }'
> 
> or using 'find' utility as below
> 
> 
>         find /usr/bin -perm +6000
> 
> 
> 
> now the question is  Which works faster, script without 'find' or with it? and How do you know?
> 
> thankx.

i'd use find.  and only in part because of awk being generally slow.  if
you use ls on a directory that has an unknown number of files, it can
blow out the command line buffer and you get GIGO results, if any.

john


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux