lgfcosta
(usa Linux Mint)
Enviado em 17/10/2012 - 11:41h
Olá pesssoal,
Tenho um arquivo com o conteúdo a seguir:
<inicio>
connected to target database: PCNISCI (DBID=4099166379)
connected to recovery catalog database
List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - --------- ----
3500237 1 1731 A 15-OCT-12 /arch1/instance/ARCH1_1731_723348591.log
3500238 1 1731 A 15-OCT-12 /data10/flash/instance/instance/archivelog/2012_10_16/o1_mf_1_1731_87t02rpq_.arc
3501785 1 1732 A 16-OCT-12 /arch1/instance/ARCH1_1732_723348591.log
3501786 1 1732 A 16-OCT-12 /data10/flash/instance/instance/archivelog/2012_10_16/o1_mf_1_1732_87w5d9qd_.arc
3502079 1 1733 A 16-OCT-12 /arch1/instance/ARCH1_1733_723348591.log
3502080 1 1733 A 16-OCT-12 /data10/flash/instance/instance/archivelog/2012_10_17/o1_mf_1_1733_87w8o593_.arc
3502086 1 1734 A 17-OCT-12 /arch1/instance/ARCH1_1734_723348591.log
3502087 1 1734 A 17-OCT-12 /data10/flash/instance/instance/archivelog/2012_10_17/o1_mf_1_1734_87w8oc9l_.arc
3502414 1 1735 A 17-OCT-12 /arch1/instance/ARCH1_1735_723348591.log
3502415 1 1735 A 17-OCT-12 /data10/flash/instance/instance/archivelog/2012_10_17/o1_mf_1_1735_87wd15bn_.arc
3502421 1 1736 A 17-OCT-12 /arch1/instance/ARCH1_1736_723348591.log
3502422 1 1736 A 17-OCT-12 /data10/flash/instance/instance/archivelog/2012_10_17/o1_mf_1_1736_87wd1bb3_.arc
Recovery Manager complete.
<fim>
Eu preciso realizar 2 passos:
1) Da listagem acima, filtrar os diretórios, então, a saída esperada deveria ser as 3 strings:
/arch1/instance
/data10/flash/instance/INSTANCE/archivelog/2012_10_16
/data10/flash/instance/INSTANCE/archivelog/2012_10_17
* Repare que eu poderia ter N diretórios na listagem.
2) Para esses diretórios, contabilizar o consumo em disco deles. Pensei em utlizar o comando "du -s $dir", mas ele me daria o total?
Agradeço antecipadamente a ajuda.