参数
- -a 列出所有连接数据
- -t tcp
- -u udp
- -n 列出端口号
- -p 列出PID
func reverseKGroup(head *ListNode, k int) *ListNode { | |
if nil == head || k <= 1 { | |
return head | |
} | |
dummy := &ListNode{-1, head} | |
stack := make([]*ListNode, k) | |
pointer := 0 | |
start, last := head, dummy | |
for nil != start { | |
stack[pointer] = start |
func swapPairs(head *ListNode) *ListNode { | |
if head == nil { | |
return head | |
} | |
dummy := &ListNode{-1, head} | |
previous, current := dummy, head | |
for current != nil { | |
// adjust | |
next := current.Next | |
if next == nil { |
import * as qs from 'qs' | |
import {env} from 'src/env' | |
import {timestamp} from './timestamp' | |
// 用于配置不同环境api地址 | |
interface IAPIURL { | |
development: string | |
test: string | |
production: string | |
} |
磁盘配额工具,针对不同的用户,群组设置不同的配额,quota支队文件系统有效,可以按照inode数量或者总的block容量来限制,支持soft和hard两个配额,当用户的磁盘配额 超过soft容量时,系统给予警告,超出hard配额时,多余的无法写入
mount -o remount,usrquota,grpquota /mountpoint
quotacheck -ugv -f/mountpoint
其中u和v分别代表检查用户配额和群组配额quotaon -ug /mountpoint
quotaoff -ug /file-system
edquota -u user
edquota -g group
也可以复制某个用户/群组的配置edquota -p source -u target
或者使用直接配置命令setquota user/group blocksoft blockhard inodesoft inodehard /mountpoint