Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

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


 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? – StuartHa Sep 9 '12 at 3:28
Try alias ls='ls --hide="*~" --color=auto' – Florian Diesch Sep 9 '12 at 3:57

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

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.