6 Nov
2007
6 Nov
'07
01:11
Pavel Nemec wrote: > 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}' find using the -mtime and the -exec option is more appropriate. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org