Take the 2-minute tour ×

These backup files clutter up my screen when I'm trying to navigate.

How do I hide files ending in a tilde so ls doesn't show them and only ls -a does. That is, I want them to behave like files which are preceded by a period.

share|improve this question
add comment

2 Answers


 alias ls='ls --hide="*~"'

to your ~/.bashrc, ~/.bash.aliases or where ever you define your shell aliases.

share|improve this answer
This works, but I lose the highlighting that ls does. How do I keep the highlighting? –  Stuart Sep 9 '12 at 3:28
Try alias ls='ls --hide="*~" --color=auto' –  Florian Diesch Sep 9 '12 at 3:57
add comment

You can set the files to be hidden. Use: ls --hide=*~.

share|improve this answer
add comment

Your Answer


