Archive - February, 2009

It’s up to you, Jesus

It’s up to you, Jesus. I have nothing to offer that’s worth anything.

Some of my favorite Linux commands

linux-penguin

Find one of many strings in a set of files
grep -E "str1|str2|str" file*.*

Search through files with multiple file extensions
grep -r --include=\*.{html,php,htm} str /path/to/directory/to/grep

Search through files with multiple extensions with one find command
find -name "*.jsp" -o -name "*.java" | xargs grep -i "whee"

Search through files with multiple extensions with one find command, regex method
find -regex ".*\(\.jsp\|\.php\|\.html\|\.htm\).*" | xargs grep -i "whee"

Replace newlines with HTML breaks in a file
sed ':a;N;$!ba;s/\n/\/g' file.txt

Rename multiple files
for f in *.txt; do mv "$f" "${f%.txt}.bak"; done

Directory sizes here and below
du -sm $(find $1 -type d -maxdepth 1 -xdev) | sort -g

Find files containing between 600 to 700 characters, inclusive.
find . -size +599c -and -size -701c

Update a file’s timestamp, but do not create files
touch -c file*.txt

Spriglet #16: Handling Hand Holding

prayer-hands

No, this isn’t the 5-dollar foot long deal.

This is more serious.

It’s about prayer.

If you’ve ever stood in a prayer circle, you’ve experienced the awkwardness of not knowing which way to hold your hands when it’s time to pray.  You wonder, hmmm, are they an over or under hand-holder?  It’s just plain embarassing to get it wrong.

Don’t guess wrong, let the people next to you decide.

Do what I do.

Just stick ‘em straight out.

Big Machines Dancing

Where do I sign up?

(h/t toolmonger)

Stilt-legged Sock Monkey

stilt-legged-sock-monkey1

New Page Section:Twitter Summaries

twitter-category

I seem to Twitter much more than I post on my blog these days.

I’ve decided to segregate my Twitter summaries into their own page, so it doesn’t clutter up everything on the home page….not that my Twitters are clutter or anything.

Page 1 of 212»
Switch to mobile version