tdbtool question
Herb Lewis
hlewis at panasas.com
Tue Jul 24 18:02:39 GMT 2007
You will notice that the key you tried to delete said it was 14 bytes
long but htere are only 13 characters. Some keys get added with a
trailing 0 that needs to be part of the key. add a \0 at the end
of the key and see if that works.
Kurt Pfeifle wrote:
> I was playing with tdbtool to show and/or delete individual keys from a
> .tdb file.
>
> What I can't find out is the precise syntax to use.
>
>
> Example:
> ========
>
> [root at prod printing]# tdbtool SCHP011.tdb
> tdb> keys
> key 23 bytes: INFO/linear_queue_array
> key 14 bytes: STATUS/SCHP011
> key 16 bytes: NOTIFY_PID_LIST
> key 20 bytes: MSG_PENDING/SCHP011
> key 13 bytes: INFO/version
> key 16 bytes: INFO/total_jobs
> key 14 bytes: CACHE/SCHP011
> tdb> help
>
> tdbtool:
> create dbname : create a database
> open dbname : open an existing database
> erase : erase the database
> dump : dump the database as strings
> cdump : dump the database as connection records
> keys : dump the database keys as strings
> hexkeys : dump the database keys as hex values
> info : print summary info about the database
> insert key data : insert a record
> move key file : move a record to a destination tdb
> store key data : store a record (replace)
> show key : show a record by key
> delete key : delete a record by key
> list : print the database hash table and freelist
> free : print the database freelist
> ! command : execute system command
> 1 | first : print the first record
> n | next : print the next record
> q | quit : terminate
> \n : repeat 'next' command
>
> tdb> info
> 7 records totalling 292 bytes
> tdb> show CACHE/SCHP011
> fetch failed
> tdb> show 'CACHE/SCHP011'
> fetch failed
> tdb> show "CACHE/SCHP011"
> fetch failed
> tdb> show CACHE\/SCHP011
> fetch failed
> tdb> show CACHE
> fetch failed
> tdb> show SCHP011
> fetch failed
>
>
> Does tdbtool even work currently? (this was 3.0.25b)
>
>
>
More information about the samba-technical
mailing list