Useful OS X Terminal Commands

As usual, last Sunday night, my Powerbook decided to come down with a really strange problem. It slowed to a crawl and for a moment I thought my hard drive was dying a slow death. However Disk Utility, showed no problems at all, so I was a bit puzzled by the problem. Eventually after deleting cache files with Cache Out X and rebuilding Prebindings and Spotlight databases, everything was back to normal. Apparantly it does not matter if I run Windows or OS X, I still end up doing computer maintenance at late hours of the night, when I could be sleeping.

I found these terminal commands handy. Unlike third party utilities, you can run these on any up-to-date OS X system.

To update Prebindings manually:

sudo update_prebinding -root / -force

To delete the Spotlight database from the boot volume:

sudo mdutil -E /

To run Software Update from terminal:

softwareupdate -l

To install Software Updates found:

sudo softwareupdate -i -a

Notes: Prebindings usually do not have to be redone, as OS X does this automatically, but if you are having a strange problem; rebuilding might help. Deleting the Spotlight database forces OS X to rebuild it right away, so it is best to let the computer sit overnight while it indexes the vloume. Spotlight is a feature of Mac OS X 10.4. For Software Update, terminal will not prompt for restart, so you must remember to do this after the updates are installed.

To Disable DMG File Verification:

defaults write com.apple.frameworks.diskimages skip-verify true

Local Port Detection

This week I have been looking at how to detect TCP/IP ports on a local area network to see if an application was setup correctly. And while using ping and tracert from a DOS prompt works well for somethings, I was looking at what else I could use. For Mac OS X users, the Network Utility tool features ping and traceroute options, or you can always use a terminal window directly to ping and traceroute. To verify that you have a listening port, the command line utility netstat -a comes in handy on both Windows and Mac OS X. With this you can verify that a particular port number is listening. You can still use the website CanYouSeeMe.org, if you want to verify that your particular computer is open to the Internet, but this only works if your router is setup to forward requests for this port. In the case where you want to run a VNC or some other service for only local network connections, netstat works much better to verify that the port is in fact listening.

Another tool which Windows users might find handy is Microsoft’s PortQryUI tool. This utility reports the port status of TCP and UDP ports on a computer that you select.

Blogs Killed Forums

I am not sure about the whole Web 2.0 debate, but something which is very noticeable about the Internet in 2006 is that forum based sites are dying a slow death, and the sites that include a forum as part of their main site are doing even worse. Forums on those sites are being posted to less and less. It seems that much of the forum posting community has gravitated to either posting primarily on their own web blogs or commenting only on blogs. This has created a shift away from forums and for sponsored forums, it has meant a loss of ad revenue. It may be possible that this trend may continue and cause some sites to scale back or disappear completely.

Lack of Discussion

The most obvious turn off to forums is the moderator. Keeping the conversation going between multiple members is quite hard to do. Most moderators are faced with either not moderating at all discussions and letting other members get offended while a couple of members go at it and argue pointlessly about which operating system is the best or whether you support The President or not. Eventually moderators do buckle down and impose some civility and this causes hard core members to feel censored. Once they leave, the forum becomes a ghost forum with only old discussions left. A moderator is pretty much a thankless job.

Not Enough Ad Revenue

As for the webmaster, you have to pay for the forum software which is not exactly cheap or risk going with an open source script that will require more technical maintenance. Then you have to pay for the domain and hosting services; all of this is added cost. Most webmasters depend on some sort of steady revenue from sponsers and forums have a reputation for not performing well in this area, unlike blogs.

Ease of Publishing

The irony is that while forums were once the easy way to publish quickly, they are now being outclassed by blog scripts. Today almost anyone can learn to publish on Blogger or in WordPress, but learning to navigate, search, and setup your profile in most forums takes longer than the five minute WordPress install.

Not Trendy

Then there is the obvious: web blogs have adapted the latest technologies like CSS, XHTML, AJAX, and other Internet buzzwords. Forums are just catching up and unlike small blog scripts, forum scripts are quite complicated and large, making even small changes sometimes requires thorough testing.

Internet Evolution

All of this leaves forums on the brink of unpopularity, forcing forum script developers to rethink their audience anf evolve into something else. Perhaps the web blog is the natural cousin to the forum, and the Internet may still have future uses for the once popular online forum.