|
From: | Tiago Schievenin |
Subject: | Re: [shell-script] Re: Script para remover arquivos antigos |
Date: | Tue, 9 Oct 2018 09:43:27 -0300 |
Completando a lógica Tiago
Se acaso não existir o diretório e considerando que esse padrão de data é parte do nome talvez fosse melhor usar outra tática:DATE=`date +%Y"."%m"."%d --d ''$i' days ago'`find $DIR -type d |sed -r 's/.*([0-9]{4}\.\.[01][0-9]\.[0-3][0-9]).*/\1 &/' |awk -v awk_data="$DATA" '$1<awk_data{print $2}' |tee -a $LOG |xargs rm -rf[]'sItamar
[Prev in Thread] Current Thread [Next in Thread]
- Script para remover arquivos antigos, Tiago Schievenin, 2018/10/03
- Re: [shell-script] Script para remover arquivos antigos, Cristiano Amaral, 2018/10/03
- Message not available
- Re: [shell-script] Script para remover arquivos antigos, itamarnet, 2018/10/04
- Re: Script para remover arquivos antigos, itamarnet, 2018/10/04
- Re: [shell-script] Re: Script para remover arquivos antigos, Tiago Schievenin <=
- Prev by Date: Re: Rodar Script em telas diferentes
- Next by Date: Re: [shell-script] Re: Rodar Script em telas diferentes
- Previous by thread: Re: Script para remover arquivos antigos
- Next by thread: Laços com o FOR
- Index(es):