Library Version 11.2.5.3

Loading text into databases
Prev Chapter 23. Dumping and Reloading Databases Next

Loading text into databases

The db_load utility can be used to load text into databases. The -T option permits nondatabase applications to create flat-text files that are then loaded into databases for fast, highly-concurrent access. For example, the following command loads the standard UNIX /etc/passwd file into a database, with the login name as the key item and the entire password entry as the data item:

awk -F: '{print 1ドル; print 0ドル}' < /etc/passwd |\
 sed 's/\\/\\\\/g' | db_load -T -t hash passwd.db

Note that backslash characters naturally occurring in the text are escaped to avoid interpretation as escape characters by the db_load utility.


Prev Up Next
Dump output formats Home Chapter 24. Additional References

AltStyle によって変換されたページ (->オリジナル) /