Dne Monday 05 November 2007 08:03:18 Ronald Wiplinger napsal(a): > I am looking for some bash scripts: > > 1. I want to list all text files of one directory with a blank line in > between. > Currently I just use grep "" * Text files? You mean file.txt, or file with text mime type? 100+1 how to do this. - ls *.txt - find . -name "*.txt"
if you need use mime types try ls | xargs file {} | grep text > 2. I want to delete files older than x (e.g., 3 minutes, 3 hours, 3 > days, ...) man find, look for TESTS or somethink like ls -l | awk ' if($6>"2007-11-06") {print $0}' > > bye > > Ronald -- Pavel Nemec Software Engineer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: [EMAIL PROTECTED] Lihovarska 1060/12 tel:+420 284 028 981 190 00 Praha 9 fax:+420 296 542 374 Ceska republika http://www.suse.cz ---------------------------------------------------------------------
signature.asc
Description: This is a digitally signed message part.