TEMPest is a tool to manage easily temporary folders/files
- Installation
- Initialization
- Add a new temp folder to the list
- List the current directories added to TEMPest
- Runing a global purge
- Purging one directory
- Access the documentation
- git
- go (golang)
First choose if you want to add permanantly GOBIN
to your PATH
export GOBIN=/bin
or
export GOBIN=/usr/bin
You can also skip this step and then just add a symlink from
$GOBIN/tempest
to/usr/bin/tempest
after the installation of TEMPest
Then
go get -v -u github.com/ChacaS0/tempest
Add this line to /etc/environment
:
GOBIN=<PATH_OF_YOUR_CHOICE>
PATH=$PATH:$GOBIN
Then
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 in $HOME/.tempest
.
It will hold the list of all the targets.
If there is an issue and the file can't be created somehow, you can still create it at its default location:
$HOME/.tempest/.tempestcf
and leave it empty for now.
This will also generate a $HOME/.tempest/.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/.tempest.yaml
with default content:
duration: 5
auto-mode: false
- duration : This is the maximum age the content of the target's content, choose it carefully!
You have to choose a duration greater than 1 !!
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 targets...
meaning that many arguments can be passed
By convention we will give the name
temp.est
to the directories to be added toTEMPest
Just open $HOME/.tempest/.tempestcf
and add a new line with the absolute path of the target to be added.
$ tempest list
$ cat $HOME/.tempest/.tempestcf
Or
$ vi $HOME/.tempest/.tempestcf
$ tempest update
The age of the files deleted will be the one older than the number of days set as "duration" in $HOME/.tempest/.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 $HOME/.tempest/.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
If you want to know more about TEMPest, visit this page.