-
Notifications
You must be signed in to change notification settings - Fork 0
Home
TEMPest is a tool to manage easily temporary folders/files
- git
- go (golang)
go get -v -u github.com/ChacaS0/tempest
It is very easy to use.
First, to initialize it the first time, run:
> tempest init
This will generate a ~/.tempestcf
file.
It will hold the list of all the temp directories.
If there is an issue and the file can't be created somehow, you can still create it at its default location:
$HOME/.tempestcf
and leave it empty for now.
This will also generate a ~/.tempest.yaml
file.
It will hold the configuration of TEMPest.
If there is an issue and the file can't be created somehow, you can still crate it at its default location:
$HOME/.tempest.yaml
with default content:
duration: 5
auto-mode: false
- duration : This is the maximum age the content of the temp directories, choose it carefully!
You have to choose a duration greater than 1, it is for your own safety!!
Positionate yourself to the deried directory. For example, if you want to add /tmp, use this instructions:
$ cd /temp
$ tempest add
Just run:
tempest add ...<PATH>
-
<PATH>
being the path to the directory to be added to the list of temp directories -
...
meaning that many arguments can be passed
By convention we will give the name
temp
to the directories to be added totempest
Just open ~/.tempestcf
and add a new line with the absolute path of the temp directory to be added.
$ tempest list
$ cat ~/.tempestcf
Or
$ vi ~/.tempestcf
$ tempest update
The age of the files deleted will be the one older than the number of days set as "duration" in ~/.tempest.yaml
In this mode, it will display the file it would delete plus the size.
Nothing gets deleted. To do so, try:
$ tempest start -t
Runing this will actually delete files/directories, make sure everything inside ~/.tempestcf
is meant to be there with tempest list
first.
$ tempest start
Still based on the config file
It is possible to purge a directory even if it is not added to tempest. There is also a test mode for this one.
$ tempest purge -p <PATH> -t
-
<PATH>
is the path you want to purge -
-t
declare the test mode
$ tempest purge -p <PATH>
-
<PATH>
is the path you want to purge
It is recommanded to have Showdown installed. If you don't but are interested, checkout this link.
$ tempest doc
There is also a "man like" view of the documentation.
$ tempest doc -m
Thanks to