view · edit · print · history

Some general points

  • Please remember that puppy runs under Linux and therefore all input is case sensitive, so FileName.rec is not the same as filename.rec as far as puppy is concerned.
  • The Toppy uses the backslash (\) as the directory separator. In contrast, Linux uses the forward slash (/) to separate directories.
  • The backslash is used by Linux shells as a special escape character to modify the meaning of the character that follows it. To prevent this behaviour (and to allow spaces in file names), the filename arguments should be enclosed in single forward quotes (') - usually found on the right hand side of the keyboard, near the enter key. An alternative is to escape the backslash itself and use the \\ idiom. If this is all too confusing, just make sure you follow the supplied examples.
  • puppy does not operate on multiple files, so you can not use wildcards such as FileName-*.rec. Instead you must run the puppy command for each file that you wish processed. There are some examples further on that show you how it's done.

Changing current directory to the NSLU2 public data directory.

This is not really a puppy command, but it makes it easier to upload and download data from the directory where it resides, rather than having to supply long pathnames.

 cd /share/hdd/data/public

Getting an overview of puppy command line arguments

Just typing puppy on the command line will show a short description of the options accepted. This page shows further examples of the most common tasks.

 Usage: puppy [-pPqv] [-d <device>] -c <command> [args]
 -p             - packet header output to stderr
 -P             - full packet dump output to stderr
 -q             - quiet transfers - no progress updates
 -v             - verbose output to stderr
 -d <device>    - USB device (must be usbfs)
                  for example /proc/bus/usb/001/003
 -c <command>   - one of size, dir, get, put, rename, delete, mkdir, reboot, cancel, turbo
 args           - optional arguments, as required by each command

 Version: 1.12, Compiled: Sep 21 2005

Finding disk capacity and amount of free space

 puppy -c size
 Total   78148608 kiB   76317 MiB   74 GiB
 Free    28578816 kiB   27909 MiB   27 GiB

Listing the top level directories on the Toppy

 puppy -c dir
 d                    0 Wed Jan  1 00:00:00 2003 DataFiles
 d                    0 Wed Jan  1 00:00:00 2003 ProgramFiles
 d                    0 Wed Jan  1 00:00:00 2003 MP3

Listing the recordings on the Toppy

 puppy -c dir 'DataFiles'
 d                    0 Thu Jan  1 09:59:59 1970 ..
 f           1751955456 Fri Dec 24 15:00:00 2004 3rd Rock from the Sun.rec
 f            624701440 Thu Dec 23 23:00:00 2004 Happy Tree Friends Christmas Special.rec
 f           2747820032 Tue Dec  7 23:45:00 2004 Voyager-2.rec
 f           7255777280 Sat Dec 25 23:25:00 2004 Johnny Mnemonic.rec

Downloading a recording from the Toppy.

This command will transfer a recorded program from the Toppy to the current directory on the NSLU2. The resulting file will be named TreeFriends.rec

 puppy -c get 'DataFiles\Happy Tree Friends Christmas Special.rec' 'TreeFriends.rec'

Uploading a TAP to the Auto Start directory

 puppy -c put usbmon_1.3.tap 'ProgramFiles\Auto Start\usbmon.tap'

Moving a recording to a different directory

 puppy -c rename 'DataFiles\Pingu.rec' 'DataFiles\Pingu\Pingu-20.rec'

Deleting a recording

 puppy -c delete 'DataFiles\Johnny Mnemonic.rec'

Rebooting the Toppy

 puppy -c reboot

Copying multiple files

This shell command will copy all Topfield Guide Data (.tgd) files from current directory to the Toppy.

  for i in *.tgd; do echo Uploading $i ; puppy -c put $i ProgramFiles\\$i ; done 

This will download all files from the ICE directory on the Toppy to the current directory.

  puppy -c dir ICE | awk '/^f/ { system(sprintf("puppy -c get \"ICE\\%s\" \"%s\"\n", substr($0, 49), substr($0,49))) }' 

Turbo mode

Turbo mode is not recommended because it has a severe negative impact on the performance of the Toppy. It will disable the remote control and prevent recording of shows.

The turbo command takes either 0 (zero) or 1 (one) as the argument to disable or enable turbo mode. Once turbo is enabled, it will persist until explicitly turned off.

Turn turbo mode on:

 puppy -c turbo 1

Turn turbo mode off:

 puppy -c turbo 0
view · edit · print · history · Last edited by peteru.
Based on work by peteru and odvdveer.
Originally by peteru.
Page last modified on September 21, 2005, at 04:17 AM