Sergio Montini

Sergio Montini - Brazilian Born, World Citizen

Brazilian Born, World Citizen.

How to prevent .DS_Store file creation over network connections

.DS_Store files are annoying. Even thought they are used to save the positions of icons, the size of the respective Finder window, the window’s background, and many more view options, for some it’s considered a design flaw of Finder.

If you want to stop them to be created on your network, follow these steps:

1. Open the Terminal.
2. Type:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

3. Press Return.
4. Restart the computer.

If you want to remove .DS_Store files on your local machine, type in your Terminal window:

sudo find / -name ".DS_Store" -depth -exec rm {} \;

  • Share/Bookmark

Geektool

Now let’s talk about one of my favorite piece of software ever, Geektool.

GeekTool

Geektool is basically a preference pane for your Mac OS X that enables you to display system logs, Unix commands output, images from your hard drive as well as from the internet, all on your desktop. Click on the image below to see my desktop:

GeekTool Desktop

These commands and images can be updated on varying schedules that you can set for each item. I can even monitor my webcam-server at home!

I wonder if there is an equivalent software for Windows and Linux, but I am not aware of. If you know please drop us a line. Sure there are people out there dying to know.

I tried to put together some of the code I’ve found on the web. See at the end of this post for credits.

So let’s start:

Monitor CPU/Memory usage:

top -ocpu -FR -l2 -n20 | grep '^....[1234567890] ' | grep -v ' 0.0% ..:' | cut -c 1-24,33-42,64-77

Command to display active connections:

netstat -ab -f inet | grep -i established

External IP Address:

echo "External :" `curl --silent http://checkip.dyndns.org | awk '{print $6}' | cut -f 1 -d "<"`

TimeMachine backup stats:

grep backupd /var/log/system.log | sed s_/System/Library/CoreServices/__g | tail -n 3

CPU stats:

top -l 1 | fgrep "CPU usage" | awk '{print "cpu usage: ", $8}'

or $9 if you want the sys cpu usage%

CPU stats:

top -l 1 | grep 'CPU usage' | cut -c 33-80

The cut -c 33-80 bit displays only columns 33 to 80 of the grep result; 33 is where the phrase "CPU usage" starts, and 80 is about at the end of the line...

Display Historic events:

grep -h "^$(date '+%m/%d')" /usr/share/calendar/calendar.{holiday,history,computer}|cut -f2

Have you got any more ideas? Share your code :-)

Geektool

Sources:
Ultimate GeekTool Setup
GeekTool - Useful and fun info on the desktop
Share your favourite web images

  • Share/Bookmark

Categories

"Better to write for yourself and have no public, than to write for the public and have no self." -Cyril Connolly