Linux command
recins 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Insert record
recins -f [Name] -v "[John]" -f [Email] -v "[john@example.com]" [file.rec]
Insert with type
recins -t [Contact] -f [Name] -v "[Jane]" [file.rec]
Insert from template
echo "Name: John" | recins [file.rec]
Replace if exists
recins -r -f [Name] -v "[John]" [file.rec]
说明
recins adds new records to GNU recutils plain-text database files. Fields and values can be specified on the command line with repeated -f and -v flags, or records can be piped in from stdin in standard recfile format (key-value pairs separated by blank lines). The -t flag assigns a record type, -r replaces an existing record instead of appending, and -S sorts records after insertion. The file is created automatically if it does not exist. Part of the GNU recutils toolkit.
参数
- -t, --type _type_
- Record type.
- -f, --field _name_
- Field name.
- -v, --value _value_
- Field value.
- -r, --replace
- Replace existing.
- -n, --name _name_
- Set record descriptor.
- -S, --sort _field_
- Sort after insert.
FAQ
What is the recins command used for?
recins adds new records to GNU recutils plain-text database files. Fields and values can be specified on the command line with repeated -f and -v flags, or records can be piped in from stdin in standard recfile format (key-value pairs separated by blank lines). The -t flag assigns a record type, -r replaces an existing record instead of appending, and -S sorts records after insertion. The file is created automatically if it does not exist. Part of the GNU recutils toolkit.
How do I run a basic recins example?
Run `recins -f [Name] -v "[John]" -f [Email] -v "[john@example.com]" [file.rec]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -t, --type _type_ do in recins?
Record type.