Ubuntu – How to hide files with a specific extension

hidden-filesnautilus

I have set of temp files created in my folder with .bak extensions. How can I make them hide by default in Ubuntu?

I tried adding a .hidden file with *.bak as entry in the file, but that is not working. Any help is very appreciated…

Best Answer

Here's a little script I wrote for hiding LaTeX intermediate files:

alias hidetex='ls *?(aux|bbl|blg|brf|lof|log|lot|out|toc) -1 > .hidden'

I added it to the ~/.bash_aliases file, so now I just cd to the folder I want to hide the files, and type hidetex.

This is intended to be executed at specific folders, but you could make it more generic (e.g. for .bak files) and change it to perform the task recursively, adding a .hidden file to each folder, but that's a little more complicated.

Related Question