Monthly Archives: September 2011

Talk Like a Pirate Day

Yes, a day late.  Because I’m not going to talk like that kind of pirate, and I’m going to break my “non-controversial” seal a little bit.  This is going to be about piracy through technology.

Sometimes I marvel at the various technologies we have and the ability to receive entertainment through a variety of channels.  I can watch television shows, movies, and other videos on my phone, computer, or television via DVD, Blu-Ray, streaming video from my cable provider or from the Internet.  However, various and frustrating barriers remain preventing this from being easier, more convenient, diverse, and overall, practically useful.

Continue reading

Linux aliasing changing directories

Not terribly complicated or clever, but I wanted to try something different… and learn something.

alias u="cd .."
alias uu="u;u"
alias uuu="uu;u"
alias uuuu="uuu;u"
alias uuuuu="uuuu;u"
alias uuuuuu="for (( i=1; i<=6; i++ )) ; do cd .. ; done"
alias uuuuuuu="uuuuuu;u"

All this because I change directory levels like crazy, and often, in the shell. I worked out #6 when I was trying to figure out a way to count the number of U’s I typed. But then I reckoned that was too complicated, but didn’t want to completely lose it.

At least it is amusing to me.

I may try to figure out how to script this at some point and count the number of U’s or pass in a parameter.

UNIX find writable files

Way back when, I posted about using find and grep.  I have learned a couple of things since then.

1) find your critiera | xargs grep your grep criteria … is nicer to your processor, memory, and quickly returning the results.

2) finding writable files.  This has been particularly useful when using a really backwards SCS that doesn’t integrate nicely, cleanly, or usable with an IDE.

My command:  find . -type f -perm /u=w

So simple. So elegant. So simply says “find all files in this directory, recursively, that are writable by the user/owner”. The one confusing thing I had about this was /u instead of /o. I figured “owner, group, world”, but it is actually “user, group, other(s)”.

Anyway, this has improved my programming life.  Yeah, I’m gonna say it… take that, Windows.