[phenixbb] clean up temporary files

Ed Pozharski epozh001 at umaryland.edu
Wed Aug 18 07:43:44 PDT 2010


On Wed, 2010-08-18 at 10:14 -0400, Jianghai Zhu wrote:
> I realize that after a phenix run, especially autobuild and autosol, there are a lot of temporary files.  Is there a way to clean up the disk?  Even the .geo file can be removed after some time, because it is huge and can be easily regenerated.  

It may be a good idea to change your defaults so that all the files
you'll only use once in a lifetime will not be generated.  Prevention,
prevention, prevention :)

Something like this

rm */*.geo

will get rid of the .geo files for a particular project.  Careful with
rm and * combination - it always helps to run the same command with ls
instead of rm just to see what files will actually get deleted (or use
rm -i which will ask for confirmation for every file).  If all your
projects are in the same master folder, something like rm */*/*.geo
issued there will clean up everything - you get the idea.

But don't blame me if you accidentally wipe all your data.  rm is not
for the weak, the files are practically gone forever.  On Linux (Ubuntu
at least) you can move set of files to trash can using "trash" instead
of rm if you put this alias into your .bashrc

alias trash='mv -t ~/.local/share/Trash/files --backup=t'

There is also trash-cli command line interface - rather handy for the
paranoid types like myself.  All the wildcard flexibility plus recovery
option.

In the future I should stick to the question which was actually asked :)

Ed.

-- 
"I'd jump in myself, if I weren't so good at whistling."
                               Julian, King of Lemurs




More information about the phenixbb mailing list