rpm2cpio xxx.rpm | cpio -div
例如:
rpm2cpio vim-8.2.2918-1.1.x86_64.rpm | cpio -div
1: 285 items found.
rpm2cpio xxx.rpm | cpio -div
例如:
rpm2cpio vim-8.2.2918-1.1.x86_64.rpm | cpio -div
直接scp加参数 -o "StrictHostKeyChecking no"
scp -o "StrictHostKeyChecking no" -i /root/key xxx.qcow2 192.168.1.100:/opt/vm/
yum -y install dhcp
配置文件:/etc/dhcp/dhcpd.conf
示例配置文件:/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example
default-lease-time 7200;
max-lease-time 14400;
subnet 10.1.119.0 netmask 255.255.255.0 {
option routers 10.1.119.128;
option domain-name-servers 10.1.102.2;
range 10.1.119.200 10.1.119.220;
}
开源地址:https://github.com/fdddf/vue3-aplayer
项目fork自 https://github.com/SevenOutman/vue-aplayer
适配vue3,需要vue3.0.7支持,更新了相关依赖。
找出已删除文件的提交记录:
git rev-list -n 1 HEAD -- <file_path>
返回为commit id
使用提交记录ID检出文件, commit id后缀**^**:
git checkout <commit id>^ -- <file_path>
或者一行命令:
$file 是文件路径
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"
在https://github.com/qiniu/qmgo 中 有个方法是传排序参数,通常是一个或多个。
func (q *Query) Sort(fields ...string) QueryI {
if len(fields) == 0 {
// A nil bson.D will not correctly serialize, but this case is no-op
// so an early return will do.
return q
}
var sorts bson.D
for _, field := range fields {
key, n := SplitSortField(field)
if key == "" {
panic("Sort: empty field name")
}
sorts = append(sorts, bson.E{Key: key, Value: n})
}
newQ := q
newQ.sort = sorts
return newQ
}
若需传递多个fields, fields是个可变参数, 传值是你可能想支持多个,但对于参数个数也清楚, 那要先定义个字符串数组。