Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
Re: [SLE] Is there a "find file on system" command?
  • From: Sid Boyce <sboyce@xxxxxxxxxxxxxxxx>
  • Date: Mon, 17 May 2004 16:37:54 +0100
  • Message-id: <40A8DC52.3080706@xxxxxxxxxxxxxxxx>
Robert Paulsen wrote:

On Monday 17 May 2004 03:43, Jerome Lyles wrote:

On Friday 14 May 2004 03:06 pm, Rob Freeman wrote:

I have never been able to find such a program on Linux.

I always:

find directory -name filename

hence to search the entire computer for all rpm's

find / -name *.rpm

Need to be root



# find / -name *.rpm
find: paths must precede expression
Usage: find [path...] [expression]

What happened? Isn't '/' enough path for this command?

You need to put quotes around the expression you are looking for if it contains special characters that the shell will act on (in your case the *). Try this...

find / -name "*.rpm"

You want the find command to see the *, not the shell.

barrabas:/ftp/apr04/cdrtools-2.01 # time find /usr -name 3Ddiag* -print0
real 2m44.757s
user 0m0.680s
sys 0m8.060s
Time enough to make that cup of cofee.

barrabas:/ftp/apr04/cdrtools-2.01 # time locate 3Ddiag

real 0m2.311s
user 0m1.460s
sys 0m0.046s

On a XP2800+ 512MB, that was. With "locate -i" it will ignore case.

Sid Boyce .... Hamradio G3VBV and keen Flyer
Linux Only Shop.

< Previous Next >