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...
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI 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...
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.
You could create a file called .hidden
in your home directory. In this file you can put the names of all the files that you would like to be hidden, one per line.
If you place a full stop (or period) at the beginning of the name of the file it should hide it, for example:
.helloworld.txt
To view your now hidden file, click "view" on Nautilus then check "Show Hidden Files".
If you and the program don't care about the name of the file, try this command:
for annoyingbak in *.bak; do mv "$annoyingbak" ."$annoyingbak"; done
Then run it whenever you're annoyed by the .baks. It moves every file named bla.bak
to .bla.bak
.
If you have to do it very often, add this to the end of your .bashrc
:
function deannoy {
for annoyingbak in *.bak; do
mv "$annoyingbak" ."$annoyingbak"
done
}
Then you can just type deannoy
in your Dropbox folder and they're gone.