grep -C n "匹配字符串" 匹配字符串上下N行

 

 

[root@xxxxx ~]# grep -C 5 'ip_whitelist' /etc/gitlab/gitlab.rb
#   'PATH' => "/opt/gitlab/bin:/opt/gitlab/embedded/bin:/bin:/usr/bin"
# }

# gitlab_rails['rack_attack_git_basic_auth'] = {
#   'enabled' => true,
#   'ip_whitelist' => ["127.0.0.1"],
#   'maxretry' => 10,
#   'findtime' => 60,
#   'bantime' => 3600
# }

 

posted @ 2016-09-23 21:58  bass  阅读(523)  评论(0编辑  收藏  举报