Showing posts with label mac. Show all posts
Showing posts with label mac. Show all posts

Friday, 7 August 2009

Mac Tip: Mount an afp drive at the command line

Sometimes I ssh into my desktop Mac from home and want to access the network, but to do this I need to mount the file system. In this case it is an AFP. It took me a little while to figure this out so I am putting it here for future reference. 

mkdir /Volumes/drive_name
mount_afp afp://USERNAME:PASSWORD@SERVER/drive_name /Volumes/drive_name/

The thing I could not get right originally was putting in the username and password, which I assumed it would know as my user name is the same on my laptop at home and my desktop, but any way this works fine. 

Friday, 24 July 2009

GeekTool rocks!


The first thing I wanted to blog about is a great little Mac tool called GeekTool. It is very aptly named in my opinion.

Basically you can add the output of anything from the command line to your Mac desktop. If you work in a terminal a lot and find your self typing the same command over and over you can just add it to your desktop.

There are lots of things you might want to view, such as memory or CPU usage, uptime or disk space for example. However, with a bit more command line magic you can get the latest content of your favourite blogs, weather forecasts, todo lists or anything really.

Things I have on my desktop:
  • Time
  • Date
  • My jobs running on the cluster
  • Cluster status
  • Weather
  • Workdays this month, elapsed and remaining
  • To Do list, from redmine
I am using GeekTool version2, but I believe that there is a version 3 available here.

The Code:
  • Date: date "+%A %eth %B %Y"
  • Time: date "+%l:%M%p"
  • Jobs: ssh userName@clusterUrl bjobs |grep userName |wc -l |xargs echo "My Jobs Running:"
  • Status: ssh userName@clusterUrl bqueues