Any arguement that can be used with 'ls' command to ignore case?
Some directories might have lots of files and some have names that contain capital letters. It would be useful to be able to list those directories without knowing which letter is in cap, hence the need for ignore case arguement for 'ls'.
Is there such an arguement to be used with 'ls' ? Thanks :) |
Not quite sure what you mean, but I think grep will do what you ask for...
ls | grep -i dIRecToRY |
Eg.
I have the following directories in my /myfolder directory: subdiroNe and ALOT more files in /myfolder and I'm interested to (1) list the files in /myfolder/subdiroNe and to (2)check if subdiroNe directory exists. If I do a Code:
ls subdiroNe Code:
ls subdirone Code:
ls -<some arguement> subdirone Thanks :) Quote:
|
Sorry, don't think ls has this option. You could however do this:
Code:
ls `ls | grep -i subdirone` |
hello!
you can try so: ls subdiro[nN]e that will list subdirone or subdiroNe (or both, if there are there) |
Quote:
|
All times are GMT -5. The time now is 01:12 AM. |