smazani souboru z urciteho data

Pavel Urban urbanp na mlp.cz
Středa Listopad 2 15:25:26 CET 2005


Miroslav Kolombo wrote:

> Potreboval bych relativne snadno smazat "moc" souboru z urciteho data, 
> konkretne z 21.8.05,
> ale krome otrociny v mc, ktery se zahlcuje mnozstvim souboru v adresari 
> (2.4 G po zhuba 100 byte)
> jsem zatim neprisel na nic rozumneho.
> 
> Je nejaka snazsi cesta? Na vytvoreni scriptu si rozhodne netroufam, 
> nerad bych si to smazal vsechno.
> 

amatersky navrh ;-)

find adresar -type f |xargs ls -l --time-style='+%Y%m%d'|perl -ne 
'/20050821\s+(.*)$/ && print "$1\n"'

tohle by melo vyplivat seznam souboru

find adresar -type f |xargs ls -l --time-style='+%Y%m%d'|perl -ne 
'/20050821\s+(.*)$/ && print "$1\n"'|xargs rm -f

...a tohle je smaze.

use at your own risk

-- 
***********************************************************************
Pavel Urban (pavel.urban na imaginet.cz)
IOL system disaster
Internet OnLine, owned by Cesky Telecom, a.s. (www.ct.cz)
***********************************************************************
    Vegetables should not operate electronic equipment.
           Computer Stupidities, http://rinkworks.com/stupid/
***********************************************************************


Další informace o konferenci Linux