To remove a single entry from a table, use the -r option as described in "Removing Single Table Entries ".
To remove multiple entries from a table, use the -R option as described in "Removing Multiple Entries From a Table "
To remove a single entry from a table, use the -r option:
| nistbladm -r indexed-name | 
This example removes the Manf-1 entry from the depts table:
| rootmaster% nistbladm -r [Dept=Manf-1,Site=Emeryville,Name=hosteen],\ depts.doc.com. | 
You can specify as few column values as you wish. If NIS+ finds duplicates, it does not remove any entry and returns an error message instead. Thus, you could have removed the Manf-1 by specifying only the Site column value, as in this example:
| rootmaster% nistbladm -r [Site=Emeryville],depts.doc.com. | 
However, you could not have removed the Sales entry by specifying only the Site column value (SanFran), because two entries have that same value (R&D and Sales):
| Dept | Site | Name | 
|---|---|---|
| R&D | SanFran | kuznetsov | 
| Sales | SanFran | jhill | 
| Manf-1 | Emeryville | hosteen | 
| Manf-2 | Sausalito | lincoln | 
To remove multiple entries from a table, use the -R option:
| nistbladm -R indexedname | 
As with the -r option, you can specify as few column values as you wish. Unlike the -r option, however, if NIS+ finds duplicates, it removes all of them. You can find the name of a table's column by using the niscat -o command. This example removes all entries in which the Site is SanFran:
| rootmaster% nistbladm -R [Site=SanFran],depts.doc.com. | 
| Dept | Site | Name | 
|---|---|---|
| Manf-1 | Emeryville | hosteen | 
| Manf-2 | Sausalito | lincoln | 
You can use the -R option to remove all the entries from a table. Simply do not specify any column values between the square brackets, as in this example:
| rootmaster% nistbladm -R [],depts.doc.com. | 
When used with the nistbladm -R command, an empty set of square brackets is interpreted as a wildcard specifying all table rows.