Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder (say, Downloads) with a custom icon.
When I execute cd Downloads and then ls, it displays


How can I make the ls command skip (thus not showing) the icon files? Maybe a .bash_profile function that overrides ls or something like that?

Thank you!

(PS: I'm on OS X 10.8)

share|improve this question

OS X's ls doesn't have the --ignore option, but you can install the GNU ls with brew install coreutils.

alias ls="gls --ignore $'Icon\r'"
share|improve this answer

You can create an alias to ls like this:

alias ls='ls --ignore=Icon*'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.