Skip to main content

Delete files based on predefined dates

Project description

file-retention

CLI para retenção de arquivos com base em qualquer data

Como instalar:

python3 -m pip install --upgrade pip
python3 -m pip install file_retention

Como utilizar:

Primeiro é necessário executar com o comando install para criar os diretórios e arquivos de configuração necessários

python3 -m file_retention install

Tirar um snapshot dos arquivos recursivamente:

python3 -m file_retention snapshot /tmp/create_files/ -e ini

Deletar os arquivos:

python3 -m file_retention delete -r 15 -y

Enviar e-mail:

Obs: quando executar python3 -m file_retention install automaticamente é criado o arquivo ~/.file_retention/mail.yml com as chaves necessárias para enviar o e-mail

python3 -m file_retention mail ~/.file_retention/mail.yml -r 15

Arquivo ~/.file_retention/mail.yml:

password: ''
port: 25
receiver: ''
sender: ''
server: localhost
subject: ''

Para mais informaões:

python3 -m file_retention --help
python3 -m file_retention snapshot --help
python3 -m file_retention mail --help
python3 -m file_retention delete --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

file_retention-0.3.1.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

file_retention-0.3.1-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file file_retention-0.3.1.tar.gz.

File metadata

  • Download URL: file_retention-0.3.1.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.9 Linux/5.14.18-100.fc33.x86_64

File hashes

Hashes for file_retention-0.3.1.tar.gz
Algorithm Hash digest
SHA256 214182dff37713be984ae19b32b06b64af42bf781ec43482e43dcefcc7a90711
MD5 c3fc92c33e557b509d943b8c60ea7f01
BLAKE2b-256 d9caca041ae7386d72ce24324c3f5447b83f8f1098b826657be6bd7953dd2661

See more details on using hashes here.

File details

Details for the file file_retention-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: file_retention-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.9.9 Linux/5.14.18-100.fc33.x86_64

File hashes

Hashes for file_retention-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 62946af10fb1bdaf2fad95818d555becace43019e87ea97a42b583266e761e84
MD5 e84394835d49b0f56dee960cee1b8015
BLAKE2b-256 3755b2248197a08a66ebddfb862f817e948078dd363826ac1d876ec8f1cf853f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page