A Personal Blog
Archive for August, 2003
Build It and They WILL Come
Aug 20th
An interesting entry over at Mezzoblue talks about Accessibility. Built it and they will come has some great points to make, especially since we’re starting to undergo the redesign/development of all of our online properties, and accessbility is big on our minds.
Aliasing Fun
Aug 20th
In DOS, a godsend in DOS 5+ was the DOSKEY command. I remember putting this in my autoexec.bat file
doskey dd=dir/w
Everytime I’d typ dd at the prompt, I’d get the wide directory listing. I used it so much in fact, that I even have it in my Windows XP PATH variable in Environment Variables. Only I use it with ls instead of dd. I’ve been using Linux way too long. ;)
But regardless, that is an alias in DOS. Today, we”re going to look at aliasing commands in Linux. I learned the aliasing trick (seen below) from ComputerWorld magazine and it is one of the most effortless things to do to avoid repetitive typing. That, and who can remember all of those god-forsaken attributes?
The syntax of an alias command looks something like this:
alias aliasname='command'
One particulalry usefulcommand that I use quite often is the ‘du’ command. This command checks on disk usage and returns quite a bit of useful information. With the -c attribute, you get a complete listing. Add a -k to the ccmmand for a listing in kilobytes. Finally, grab only the most ciritical data with a -s for summary. What you have now is a ‘ducks’ alias.
alias ducks='du -cks *'
Now that’s good and will give us a bunch of information. But if you really want to make this baby dance, pipe it to a sort command to list them in some sembalnce of order. To do this, we will use the ‘sort’ command. Do I need to explain what this does? :rolleyes: With an -rn tag, we sort in Ascending (Reverse) order by numerical value. Our alias now looks like this:
alias ducks='du -cks * | sort -rn'
Now all you have to type in at a command prompt is
$ ducks
and you will get a nice concise summary of directory usage. It descends recursively into subdirectories as well.
It will look something like this
$ cd /home $ ducks 98800 user1 78430 user2 128053 user3
For more information on these commands, visit the links below:
Enjoy!
Who Do You Ping?
Aug 20th
Just curious what sites/services other bloggers and MT users ping when you publish new entries. We are currently only pinging the defaults:
http://rpc.weblogs.com/RPC2
http://ping.blo.gs/
Are there others that we’re missing out on simply because we’re new to this?
Chief Fun Officer?
Aug 20th
It seems that more and more companies are following the advice of last year’s big Fortune series on how to reward your employees when you can’t afford to reward them. Maybe that isn’t the motivation, but this article on the trend of having more and more ‘C’ positions doesn’t seem to be going away, in North America anyways. (more…)
Great .NET Resource
Aug 20th
A fantastic resource that I found as a direct result of the Big Ol’ Blackout, Code Project has loads of articles covering nearly every topic imaginable. The guys running it are in Toronto as well, so I might drop them a line and grab a pint.