Hi I’m not sure this is the right place to ask the following question, if not move it and let me know.
Maybe some of you know about it, but I (along with many other user) have an issue with how Firefox (since version 98) automatically downloads files like PDF to the download folder! and I end up with multiple versions of the same file that I looked at on line on several different occasions. I looked online for solution, but none worked.
So after a while I had an idea for a work around:
I created the folder ‘firefoxtemp’ in / tmp/firefoxtemp
I changed the download directory in Firefox to /tmp/firefoxtemp
I also changed some options in ‘about:config’ to always be presented with the option to ‘Open/View’ or ‘Save’ file
When I choose to ‘Save’, I can pick where to save the file. When I choose ‘Open/View’ it opens up in Firefox and also gets downloaded to /temp/firefoxtemp
I then need to remember to run ‘Bleachbit’ once a week or so and it will clear all the files inside /temp/firefoxtemp
My question here is for advice on how to write and implement a small script that will do what ‘Bleachbit’ does but automatically on close (or opening) of Firefox, or the whole system without me having to remember to rum ‘Bleachbit’
If you use /tmp instead of /temp, then you won’t need any script. /tmp is a tmpfs, which means that its contents live in virtual memory — in practice, this means RAM, but they can be paged out if more RAM is needed — and will automatically be wiped clean when the system shuts down.