using dsktool.rb on ubuntu

This post was originally published on this site.

first install the dsktool gem with sudo gem install dsktool

now try to run dsktool.rb with dsktool.rb -v

If you get an error message like “-bash: dsktool.rb: command not found” then you will need to put the gem bin directory into your path:
open up ~/.bashrc  in the editor of your choice, and at the bottom of the file add 
export PATH=$PATH:/var/lib/gems/1.8/bin
Then save .bashrc, and restart your terminal window.

Now try to view the catalog of an online dsk file:

dsktool.rb http://www.apple2.org.za/mirrors/ftp.apple.asimov.net/images/unsorted/White_Disks/white_25a.dsk.gz -c

Your should get back a listing like:

*T 049 BASICS OF KRACKING 2
*A 00A HELLO
*T 030 KRACKING CYCLOD2
*T 049 BASICS OF KRACKING 3
*T 042 BASICS OF KRACKING 4
*B 01B DEMUFFIN PLUS
*A 003 LIST TEXT FILES: INSTRUCTIONS
*A 003 LIST TEXT FILES
*T 021 KRACKING WAY OUT
*T 047 KRACKING CYCLOD
*T 037 BASICS OF KRACKING 1
*T 01D KRACKING WAY OUT2

Now you can read one of the individual files, like this:
dsktool.rb http://www.apple2.org.za/mirrors/ftp.apple.asimov.net/images/unsorted/White_Disks/white_25a.dsk.gz -e “BASICS OF KRACKING 1” | less
to view one of the classic introductions to removing copy-protection from Apple II disks by Krackowicz

More complete docs can be found at http://dsktool.rubyforge.org/