Re: Faster Searching !

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

 



----- Original Message ----- From: "fly over" <fly_over@xxxxxxxx>
To: "Paul Howarth" <paul@xxxxxxxxxxxx>; <fedora-list@xxxxxxxxxx>
Sent: Sunday, February 06, 2005 9:23 PM
Subject: Faster Searching !



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.

Run each command under /usr/bin/time:

/usr/bin/time ls -l /usr/bin | awk '/^-.....[s]/ { print $3, $9 }'

/usr/bin/time find /usr/bin -perm +6000

My bets are on the find command - the ls command relies on a pipe to a completely different command, which is going to slow the whole process down a bunch.

Thomas


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

  Powered by Linux