LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-19-2005, 04:33 AM   #1
gururaj
LQ Newbie
 
Registered: Apr 2005
Posts: 13

Rep: Reputation: 0
ls option for ignoring the case


hi

i usesd "ls -l fee*.new" to list all the files.
but have files which has "fee" in both the cases. So is there any other option in ls to search ignoring the case?

thanks in advance

Guru
 
Old 08-19-2005, 04:55 AM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Not sure about ls but I used find command in past:

Code:
find . -iname "fee*.new"
Hope this helps!
 
Old 08-19-2005, 05:26 AM   #3
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hi,

another solution with ls + grep:
Code:
ls -l *.new | grep -i ^fee
Oliv'
 
Old 08-19-2005, 05:51 AM   #4
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Or just "ls -l [Ff][Ee][Ee]*.new"
 
Old 08-19-2005, 07:27 AM   #5
gururaj
LQ Newbie
 
Registered: Apr 2005
Posts: 13

Original Poster
Rep: Reputation: 0
hi
I tried "ls -l [Ff][Ee][Ee]*.new" this . It is working fine.
But when there is no file was found it throws
"ls: 0653-341 The file [Dd] does not exist" error i need to suppress this.
is there any way to suppress this

tnx
Guru
 
Old 08-19-2005, 11:58 AM   #6
geeman2.0
Member
 
Registered: Feb 2005
Location: Ontario, Canada
Distribution: Gentoo, Slackware
Posts: 345

Rep: Reputation: 30
Send the error output to the null device

Quote:
ls -l [Ff][Ee][Ee]*.new 2> /dev/null
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting sLoPPy cASE to Pretty Case with tr lowpro2k3 Programming 4 04-13-2005 08:13 PM
Why are all my upper case files being shown as lower case?? [Kernel 2.6.9-1.667 FC3] t3gah Fedora 4 03-11-2005 04:09 PM
Lower case to upper case letter sudhasmyle Programming 1 12-03-2004 04:15 AM
ignoring drive Y: Johng Linux - Software 2 12-14-2003 02:09 PM
up2date is ignoring me nattybumpo Linux - Networking 1 04-24-2003 01:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration