Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

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

share|improve this answer

Add

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

Your Answer

 
discard

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.