[FUGSPBR] RES: [FUGSPBR] Exclusão de Arquivos

Ricardo Campos Passanezi riccp em ige.unicamp.br
Qua Jan 22 12:00:43 BRST 2003


On Wed, Jan 22, 2003 at 11:40:41AM -0200, Julio C. ZIliotto wrote:
> como eu poderia fazer este script?
> hoje eu mando listar (ls -R |grep INBOXTrash > lixo) e com base no relatorio
> eu vou (arcaica e manualmente)pasta por pasta e deletos os referidos. vc
> poderia me orientar melhor?
> 
> grato
> 
> coloque os comandos para apagar os arquivos num script e coloque ele na
> tabela do crond (man crontab)
> 

Qual webmail que usa?

Usando o SquirrelMail, por exemplo, tem um plugin "Empty Trash"
(descrição: The Empty Trash plugin will automatically empty a user's
trash folder periodically. In this version of the plugin, a user's trash
folder is emptied under the following circumstances: 1) Every 10th login
2) Once a week. There are no options for a user to prevent this from
happening. If you install this plugin then any and all user's trash will
be deleted periodically. Version 1.0 has been tested with SM >= 1.2.8
and does work unmodified. However, users are encouraged to upgrade to
1.1 for a significant bug fix (if you use a database backend for user
preferences).)

Veja se não há algo pareciso com o que você quer.

Como "script", pode colocar na crontab:

# find /home -type f -prune -name "INBOXTrash" -exec /bin/cp /dev/null {} \;


Obs: man find, para mais detalhes.

-- 
Ricardo Campos Passanezi -  Administrador de Rede
Chave PGP e GPG Pública em: http://www.ige.unicamp.br/~riccp
Instituto de Geociências -  http://www.ige.unicamp.br - UNICAMP
_______________________________________________________________
Sair da Lista: http://www2.fugspbr.org/mailman/listinfo/fugspbr
Historico: http://www4.fugspbr.org/lista/html/FUG-BR/



Mais detalhes sobre a lista de discussão freebsd