dev-master
9999999-devCLI tool to clean up your server (e.g. remove files and directories that are overdue)
MIT MIT License
The Requires
The Development Requires
Wallogit.com
2017 © Pedro Peláez
CLI tool to clean up your server (e.g. remove files and directories that are overdue)
CLI tool to clean up your server (e.g. remove files and directories that are overdue), (*1)
Requires PHP 5.5 or later. There are no plans to support PHP 5.4 or PHP 5.3. In case this is an obstacle for you, conversion should be no problem. The library is very small., (*2)
It is installable and autoloadable via Composer as genkgo/srvcleaner., (*3)
To run the unit tests at the command line, issue phpunit -c tests/. PHPUnit is required., (*5)
This library attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request., (*6)
vendor/bin/box build -c box.json
The config containing your cleanup tasks. Remove directories (including contents) or remove files., (*7)
{
"name": "Test Cleaner",
"tasks": [{
"name" : "removeTmp",
"src": "CleanUpDirectories",
"config": {
"path": "/tmp",
"match": ["srvcleaner*"]
}
},{
"name" : "removeTmp",
"src": "CleanUpFiles",
"config": {
"path": "/tmp",
"match": ["*.tmp"]
}
}
]
}
If you are removing backups that are overdue, use the following settings to remove backups older than 30 days., (*8)
{
"name": "Test Cleaner",
"tasks": [{
"name" : "removeTmp",
"src": "CleanUpFiles",
"config": {
"path": "/tmp",
"match": ["*.tar.gz"],
"modifiedAt": "P30D"
}
}
]
}
phar/srvcleaner.phar clean -c srvcleaner.json
CLI tool to clean up your server (e.g. remove files and directories that are overdue)
MIT MIT License