Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Chris F.A. Johnson" Newsgroups: comp.os.linux.misc Subject: Re: Case insensitive bash search? Date: Fri, 25 Jan 2013 20:11:56 -0500 Organization: A noiseless patient Spider Lines: 51 Message-ID: References: <2t4bt9-gls.ln1@squidward.local.dionic.net> Reply-To: cfajohnson@gmail.com Injection-Info: mx04.eternal-september.org; posting-host="3bcc0d29074c905279f7f772ea907a02"; logging-data="8778"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18cDw9WWnW5UwpwWmcyz9qhpuuWqph77Ac=" User-Agent: slrn/0.9.8.1 (Linux) Cancel-Lock: sha1:Yjbvkb6hHLuP2PxsEaDUwRzOd1A= Xref: csiph.com comp.os.linux.misc:7106 On 2013-01-25, Tim Watts wrote: > On Friday 25 January 2013 23:01 Jon Danniken wrote in comp.os.linux.misc: > >> On 01/25/2013 12:01 PM, Tim Watts wrote: >>> On Friday 25 January 2013 16:59 Jon Danniken wrote in comp.os.linux.misc: >>> >>>> Hello, >>>> >>>> Is it possible to have the search of a folder with "ll" return all >>>> case-insensitive results? >>>> >>>> As an example, if I search for "*Foo*", I will only get files that have >>>> the capital "F", but not "foo". >>>> >>>> Is there any way to have results returned regardless of case? >>>> >>>> Thanks, >>>> >>>> Jon >>> >>> find -iname ... -maxdepth 1 >>> >>> Or do you *really* want to do it in the shell? >> >> Thanks Tim. My reason for trying to do this in the shell (as opposed to >> in a file manager) is because I have some folders with a lot of files in >> them (thousands to tens of thousands), and my file manager (Dolphin - >> KDE) often has problems at times with folders that big. >> >> I find that using the shell is a *lot* quicker than the file manager, >> and very noticeably so when interacting with one of these >> "high-capacity" folders. > > I really meant "are you obsessed with not exec-ing other command binaries"? > That could be a valid concern on a crappy little embedded system, but not > usually a problem on a normal system It can be important on any system. If all the processing can be done by a single call to an external command, that's fine, but if it has to be called in a loop, it can make a vast difference to the time it takes. Since snippets of code are often incorporated into larger scripts, inefficiences arfe magnified. -- Chris F.A. Johnson, Author: Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress) Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)