Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Are you sure you are not missing a '=' after lsnocase? Commented Aug 29, 2013 at 21:09
  • Anthon: The (revised) lsnc and lsncl work for me under tcsh and bash on both Cygwin and Ubuntu. Note that for bash, I'm using a function, not an "alias" per se. Lester Commented Aug 31, 2013 at 0:07
  • Anthon: Yes, you likely can use alias in bash, like alias lsncl='ls -l $1 | sort -f -k 9' Commented Aug 31, 2013 at 0:13
  • This answer does not address the specific question which wants to pass the files passed to ls to be treated as a case-insensitive. If the shell passes passes too few files to ls, there's nothing ls and sort can can to fix the situation. As noted in other answers, the problem needs to solved in the shell, not with an ls syntax. Commented Sep 14, 2015 at 18:13