TIP: Click on subject to list as thread! ANSI
echo: linuxhelp
to: John Beckett
from: Randall Parker
date: 2006-12-20 20:38:00
subject: Re: Recursive ls on book...?

MSGID: 1:379/45 97a24391
 REPLY: 1:379/45 86243e91
 TZUTC: -0500
 CHARSET: PC-8
From: Randall Parker 

John Beckett wrote:
> You've had some informative replies, but they have not mentioned one vital
> point. If Unix had a 'dir /s' command, the above would still not do what
> you want because Unix has no concept of a file extension.

Suppose one wants to find, say, book*.html. How hard is it to do that?

> The pattern book*.*
> matches only file names starting with 'book' AND
> that contain a period (".") after 'book'.
>
> As was mentioned, you need pattern book* (no period).

So find is the command to use unless you have an up-to-date database for
locate?

> The action "-print" is usually the default, so the equivalent of
> DOS 'dir /s book*.*' is
> find . -name "book*"

This seems verbose. But the -name applies to what comes after it, right? So how
could one create an alias or script that would just take a path and a string?
e.g.:

ff . "book*"

>
> The '.' refers to the current directory. Use '/' to start from root.
>
> When I last investigated 'find' (a couple of years ago), I discovered that
> you should use 'locate' or better still 'slocate'. These are much faster,
> but depend on an index file being maintained.

So how to update the database for locate and slocate?

>
> I think that 'find' is strictly case sensitive, whereas 'slocate' has an
> option for case insensitive searching.
>
> John
>

--- BBBS/NT v4.01 Flag-5
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/45)
SEEN-BY: 633/267 270 5030/786
@PATH: 261/1 38 123/500 379/1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.