Bash tips and tricks

guda | J August, 2008 | 2:13 pm

Nice quick bash book

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html (loops)

How to check if files containt “this” and “that”

grep -i 'for nut in self._foundNuts:' `grep -ril "loop(1):" *`

Display timestamp

date -d @1231351762

2 responses

delete files older than a week find ./ -mtime +6 -print0

htc samsung omnia review

delete files older than a week
find ./ -mtime +6 -print0 | xargs -0 rm -f

find /tmp -name 'ses*' -mtime +3 -print0 | xargs

guda

find /tmp -name ’ses*’ -mtime +3 -print0 | xargs -0 rm -f

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>