Index: branches/pap/Nebulous/bin/neb-cull
===================================================================
--- branches/pap/Nebulous/bin/neb-cull	(revision 23948)
+++ branches/pap/Nebulous/bin/neb-cull	(revision 25027)
@@ -16,5 +16,5 @@
 use Pod::Usage qw( pod2usage );
 
-my ($server, $volume);
+my ($server, $volume, $one_only);
 
 $server = $ENV{'NEB_SERVER'} unless $server;
@@ -23,4 +23,5 @@
     'server|s=s'    => \$server,
     'volume|v=s'    => \$volume,
+    'one_only|o'    => \$one_only,
 ) || pod2usage( 2 );
 
@@ -40,10 +41,24 @@
     unless defined $neb;
 
+my @cull_args;    
+push @cull_args, $key;
 if (defined $volume) {
-    $neb->cull($key, $volume)
-        or die "failed to replicate Nebulous key: $key";
+    push @cull_args, $volume;
+}
+
+if ($one_only) {
+    my $status = $neb->there_can_be_only_one(@cull_args);
+    if ($status == 0) {
+        die "not enough instances of Nebulous key: $key";
+    }
+    if (not defined $status or $status < 1) {
+        die "failed to cull Nebulous key: $key - " . $neb->err
+            if defined $neb->err;
+        die "failed to cull Nebulous key: $key";
+    }
 } else {
-    $neb->cull($key)
-        or die "failed to replicate Nebulous key: $key";
+    unless (defined $neb->cull(@cull_args)) {
+        die "failed to cull Nebulous key: $key - " . $neb->err;
+    }
 }
 
@@ -58,5 +73,5 @@
 =head1 SYNOPSIS
 
-    neb-cull [--server <URL>] [--volume <volume name>] <key>
+    neb-cull [--server <URL>] [--volume <volume name>] [--one_only] <key>
 
 =head1 DESCRIPTION
@@ -77,4 +92,12 @@
 
 Symbolic name of the volume to create the new instance on.
+
+Optional.
+
+=item * --one_only|-o
+
+Removes all but one instances of an object.  Any inaccessible instances are
+removed.  If C<--volume> is specified, and an instance exists on that volume,
+all instances but the one on that volume are removed.
 
 Optional.
@@ -110,5 +133,5 @@
 =head1 COPYRIGHT
 
-Copyright (C) 2007-2008  Joshua Hoblitt.  All rights reserved.
+Copyright (C) 2007-2009  Joshua Hoblitt.  All rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under
Index: branches/pap/Nebulous/bin/neb-locate
===================================================================
--- branches/pap/Nebulous/bin/neb-locate	(revision 23948)
+++ branches/pap/Nebulous/bin/neb-locate	(revision 25027)
@@ -41,4 +41,6 @@
     unless defined $neb;
 
+$volume = 'any' if defined $all;
+
 my $uris;
 if (defined $volume) {
@@ -70,5 +72,5 @@
 }
 
-print join(" ", @files), "\n";
+print join("\n", @files), "\n";
 
 __END__
Index: branches/pap/Nebulous/bin/neb-ls
===================================================================
--- branches/pap/Nebulous/bin/neb-ls	(revision 23948)
+++ branches/pap/Nebulous/bin/neb-ls	(revision 25027)
@@ -21,4 +21,7 @@
 
 $server = $ENV{'NEB_SERVER'} unless $server;
+
+# make --long the default
+$long = 1;
 
 GetOptions(
Index: branches/pap/Nebulous/bin/neb-replicate
===================================================================
--- branches/pap/Nebulous/bin/neb-replicate	(revision 23948)
+++ branches/pap/Nebulous/bin/neb-replicate	(revision 25027)
@@ -16,5 +16,5 @@
 use Pod::Usage qw( pod2usage );
 
-my ($server, $volume, $copies);
+my ($server, $volume, $copies, $set_copies);
 $copies = 1;  # default to making just one copy
 
Index: branches/pap/Nebulous/bin/neb-rm
===================================================================
--- branches/pap/Nebulous/bin/neb-rm	(revision 23948)
+++ branches/pap/Nebulous/bin/neb-rm	(revision 25027)
@@ -16,9 +16,15 @@
 use Pod::Usage qw( pod2usage );
 
-my ($server);
+my (
+    $force,
+    $move,
+    $server,
+);
 
 $server = $ENV{'NEB_SERVER'} unless $server;
 
 GetOptions(
+    'force|f'       => \$force,
+    'move|m'        => \$move,
     'server|s=s'    => \$server,
 ) || pod2usage( 2 );
@@ -35,5 +41,9 @@
 
 foreach my $key (@ARGV) {
-    $neb->delete($key) or warn "failed to delete key: $key";
+    unless (defined $move) {
+        $neb->delete($key, $force) or warn "failed to delete key: $key";
+    } else {
+        $neb->move($key, "${key}.rm") or warn "failed to move key: $key";
+    }
 }
 
@@ -48,5 +58,5 @@
 =head1 SYNOPSIS
 
-    neb-rm [--server <URL>] <key...>
+    neb-rm [--server <URL>] [--force] [--move] <key...>
 
 =head1 DESCRIPTION
@@ -58,4 +68,18 @@
 
 =over 4
+
+=item * --force|-f
+
+When set, C<<key>> will be removed from the nebulous database even if the on
+disk file(s) are missing.
+
+Optional.
+
+=item * --move|-m
+
+When set, this flag causes C<<key>> to be renamed to C<<key>.rm> instead of
+being deleted.
+
+Optional.
 
 =item * --server|-s <URL>
Index: branches/pap/Nebulous/bin/neb-stat
===================================================================
--- branches/pap/Nebulous/bin/neb-stat	(revision 23948)
+++ branches/pap/Nebulous/bin/neb-stat	(revision 25027)
@@ -41,16 +41,17 @@
 my $stat = $neb->stat($key);
 die "nebulous key: $key not found" unless $stat;   
-my $instances = $neb->find_instances($key, ':any');
+my $instances = $neb->find_instances($key, 'any');
 die "no instances found" unless $instances;   
 
 no warnings qw(uninitialized);
 print
-    "object id:     ", @$stat[0], "\n",
-    "key:           ", @$stat[1], "\n",
-    "read lock:     ", @$stat[2], "\n",
-    "write lock:    ", @$stat[3], "\n",
-    "epoch:         ", @$stat[4], "\n",
-    "mtime:         ", @$stat[5], "\n",
-    "n instances:   ", @$stat[6], "\n",
+    "object id:             ", @$stat[0], "\n",
+    "key:                   ", @$stat[1], "\n",
+    "read lock:             ", @$stat[2], "\n",
+    "write lock:            ", @$stat[3], "\n",
+    "epoch:                 ", @$stat[4], "\n",
+    "mtime:                 ", @$stat[5], "\n",
+    "available instances:   ", @$stat[6], "\n",
+    "total instances:       ", @$stat[7], "\n",
     "instance location:\n", " " x 4,
     join("\n" . " " x 4, @$instances), "\n";
