《k8s权威指南学习》--Service
7z
ab
accept
ack
ag
alias
apachectl
apk
apropos
apt-get
apt-key
apt-sortpkgs
aptitude
ar
arch
arj
arp
arpd
arping
arptables
arpwatch
as
ASCII码表
at
atop
atq
atrm
awk
axel
badblocks
base64
basename
batch
bc
bg
bind
blkid
blockdev
bmodinfo
break
builtin
bunzip2
bye
bzcat
bzcmp
bzdiff
bzgrep
bzip2
bzip2recover
bzless
bzmore
cal
Calico容器网络
cancel
cat
cd
cdrecord
centos检测新的硬盘
CentOS调整磁盘大小【磁盘空间移动】
cgroup
chage
chattr
chcon
chfn
chgrp
chkconfig
chmod
chown
chpasswd
chroot
chsh
cksum
clear
clock
clockdiff
cmp
col
colrm
comm
command
compress
conntrack相关字段
consoletype
continue
convertquota
cp
cpio
crontab
csplit
cu
cupsdisable
cupsenable
curl
cut
date
dc
dd
declare
depmod
df
dhclient
dhcpd
dhcrelay
diff
diff3
diffstat
dig
dircolors
dirname
dirs
disown
dmesg
dmidecode
dnf
dnsdomainname
domainname
dos2unix
dpkg
dpkg-deb
dpkg-divert
dpkg-preconfigure
dpkg-query
dpkg-reconfigure
dpkg-split
dpkg-statoverride
dpkg-trigger
dris
dstat
du
dump
e2fsck
e2label
eBPF_cilium
eBPF入门
echo
ed
edquota
egrep
eject
elinks
elm
emacs
enable
env
ethtool
ex
exec
exit
expand
export
exportfs
expr
false
fc
fdisk
fg
fgrep
file
find
findfs
finger
firewall-cmd
fishshell
fmt
fold
fping
free
fsck
ftp
ftpcount
ftpshut
ftptop
ftpwho
fuser
gcc
gcov
gdb
get_module
getenforce
getsebool
git
gpasswd
gpm
grep
groupadd
groupdel
groupmems
groupmod
groups
grpck
grpconv
grpunconv
grub
grub2-mkconfig
grub2-set-default
gunzip
gzexe
gzip
halt
hdparm
head
help
hexdump
history
host
hostid
hostname
hostnamectl
hping3
htdigest
htop
htpasswd
hwclock
hypervisor
iconv
id
ifcfg
ifconfig
ifconfig配置命令
ifdown
ifstat
iftop
ifup
indent
info
init
inotifywait
insmod
install
Internet和internet
iostat
iotop
ip
ip link
ip6tables
ip6tables-restore
ip6tables-save
ipcalc
ipcrm
ipcs
iperf
iptables
iptables-restore
iptables-save
iptables的数据包的流程介绍
iptables详解
iptraf
iptstate
ispell
jed
jobs
joe
join
journalctl
jq
jwhois
k8s downward API
k8s网络
kernelversion
kexec
kill
kill 命令的用途
killall
last
lastb
lastlog
ld
ldconfig
ldd
less
let
lftp
lftpget
lha
lilo
linux cat
linux cron表达式
linux tmp文件
linux_lldptool
linux修改系统语言
linux日志轮转
linux用户态与内核态
linux自动化交互工具:expect示例
ln
lnstat
local
locate
logger
login
logname
logout
logrotate
logsave
logwatch
look
losetup
lp
lpadmin
lpc
lpq
lpr
lprm
lpstat
ls
lsattr
lsb_release
lsblk
lscpu
lsmod
lsof
lspci
lsusb
ltrace
lvcreate
lvdisplay
lvextend
lvreduce
lvremove
lvresize
lvscan
lynx
mail
mailq
mailstat
make
man
mapfile
md5sum
mesg
mii-tool
mkbootdisk
mkcert
mkdir
mke2fs
mkfs
mkinitrd
mkisofs
mknod
mkswap
mktemp
modprobe
more
mount
mpstat
mtools
mv
mysql
mysqladmin
mysqldump
mysqlimport
mysqlshow
named-checkzone
nano
nc
ncftp
neofetch
nethogs
netstat
newusers
nfsstat
ngrep
nice
nisdomainname
nl
nm
nmap
nmcli
nohup
nologin
nproc
nslookup
ntpdate
ntsysv
objdump
od
openssl
parted
partprobe
passwd
paste
patch
pathchk
perl
pfctl
pgrep
php
pico
pidof
pidstat
pigz
ping
pkill
pmap
popd
poweroff
ppp-off
pr
printf
protoize
ps
pssh
pstack
pstree
pushd
pv
pvchange
pvck
pvcreate
pvdisplay
pvremove
pvs
pvscan
pwck
pwconv
pwd
pwunconv
python setup.py编写参考
quota
quotacheck
quotaoff
quotaon
rcconf
rcp
read
readelf
readonly
reboot
reject
rename
renice
repquota
resize
restore
restorecon
return
rev
rexec
rlogin
rm
rmdir
rmmod
route
rpm
rpm2cpio
rpmbuild
rpmdb
rpmquery
rpmsign
rpmverify
rsh
rsync
runlevel
sar
scp
screen
script
scriptreplay
sed
sed替换命令收集
seinfo
semanage
sendmail
seq
service
sesearch
set
setfacl
setpci
setsebool
setsid
sftp
sftp-server
sh
shell中=和~的用法
shift
shopt
showmount
shuf
shutdown
skill
slabtop
sleep
slocate
smbclient
smbpasswd
SNAT和DNAT
sort
source
speedtest-cli
spell
split
squid
squidclient
ss
ssh
ssh-add
ssh-agent
ssh-copy-id
ssh-keygen
ssh-keyscan
sshd
startx
stat
strace
strings
stty
su
sudo
sum
supervisord
suspend
swapoff
swapon
sync
sysctl
syslog
systemctl
systool
tac
tail
tailf
talk
tar
tcpdump
tcpdump参数
tcpreplay
tee
telinit
telnet
tempfile
test
tftp
time
timedatectl
times
tload
tmux
top
touch
tput
tr
tracepath
traceroute
trap
tree
true
tty
type
ulimit
umask
umount
unalias
uname
unarj
uncompress
unexpand
uniq
unlink
unprotoize
unrar
unset
unzip
updatedb
uptime
useradd
userdel
usermod
usernetctl
users
uucico
uupick
uuto
vdfuse
vgchange
vgconvert
vgcreate
vgdisplay
vgextend
vgreduce
vgremove
vgrename
vgscan
vi
vim常用的一些命令记录
vmstat
volname
w
wait
wall
watch
wc
wget
whatis
whereis
which
who
whoami
write
xargs
xauth
xclip
xhost
xinit
xlsatoms
xlsclients
xlsfonts
xrandr
xset
xz
yes
ypdomainname
yum
zcat
zfore
zip
zipinfo
zipsplit
znew
主机通过dhcp获取ip的过程
二层交换机和三层交换机区别
修改Centos官方云镜像的root密码
修改rpm包
如何解决虚拟机断电重启后进入紧急模式的问题
容器化和kvm的区别
建立一个名为agetest的账号,该账号第一次登陆后使用默认密码,但必须更改密码后使用新密码才能够登陆系统使用bash环境
收藏专题
查看POD的IP地址
网卡的混杂模式
解压缩
输入输出定向
2024-08-08    2024-08-08    940 字  2 分钟

ag

ack 的升级版,C语言编写,更快更人性化

补充说明

ag命令 它比ack快一个数量级。它会忽略 .gitignore 和 .hgignore 中的文件模式。如果源代码库中有您不想搜索的文件,只需将它们的模式添加到 .ignore 文件即可。命令名称比 ack 短 33%,并且所有键都在 home 行! Github-参考链接

语法

1
2
ag [options] pattern [path ...]
ag [可选项] 匹配模式 [路径...]

选项

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Output Options:
     --ackmate            以 AckMate-parseable 的格式显示结果
  -A --after [LINES]      显示匹配行之后的行(默认2行)
  -B --before [LINES]     显示匹配行之前的行(默认2行)
     --[no]break          不同文件中匹配到的内容新建一行显示(默认开启)
  -c --count              只显示每个文件中匹配到的数量
                          (This often differs from the number of matching lines)
     --[no]color          Print color codes in results (Enabled by default)
     --color-line-number  Color codes for line numbers (Default: 1;33)
     --color-match        Color codes for result match numbers (Default: 30;43)
     --color-path         Color codes for path names (Default: 1;32)
     --column             Print column numbers in results
     --[no]filename       Print file names (Enabled unless searching a single file)
  -H --[no]heading        在每个文件匹配前输出文件名(默认开启)
  -C --context [LINES]    显示匹配行上下两行(默认2行)
     --[no]group          Same as --[no]break --[no]heading
  -g --filename-pattern PATTERN
                          Print filenames matching PATTERN
  -l --files-with-matches 显示包含匹配的文件名(不显示匹配的行)
  -L --files-without-matches  只显示不包含匹配项的文件名
     --print-all-files    Print headings for all files searched, even those that
                          don\'t contain matches
     --[no]numbers        Print line numbers. Default is to omit line numbers
                          when searching streams
  -o --only-matching      只输出每行匹配的部分
     --print-long-lines   Print matches on very long lines (Default: >2k characters)
     --passthrough        When searching a stream, print all lines even if they
                          don\'t match
     --silent             Suppress all log messages, including errors
     --stats              Print stats (files scanned, time taken, etc.)
     --stats-only         Print stats and nothing else.
                          (Same as --count when searching a single file)
     --vimgrep            Print results like vim\'s :vimgrep /pattern/g would
                          (it reports every match on the line)
  -0 --null --print0      Separate filenames with null (for 'xargs -0')

Search Options:
  -a --all-types          搜索所有文件(包括隐藏文件)
  -D --debug              Ridiculous debugging (probably not useful)
     --depth NUM          目录搜索最大深度(默认25)
  -f --follow             跟随链接进行搜索
  -F --fixed-strings      Alias for --literal for compatibility with grep
  -G --file-search-regex  根据正则匹配搜索指定类型的文件
     --hidden             Search hidden files (obeys .*ignore files)
  -i --ignore-case        Match case insensitively
     --ignore PATTERN     Ignore files/directories matching PATTERN
                          (literal file/directory names also allowed)
     --ignore-dir NAME    Alias for --ignore for compatibility with ack.
  -m --max-count NUM      在一个文件中最大匹配的数量(默认: 10,000)
     --one-device         不跟随其他设备的链接搜索
  -p --path-to-ignore STRING
                          Use .ignore file at STRING
  -Q --literal            Don\'t parse PATTERN as a regular expression
  -s --case-sensitive     Match case sensitively
  -S --smart-case         Match case insensitively unless PATTERN contains
                          uppercase characters (Enabled by default)
     --search-binary      搜索二进制文件
  -t --all-text           搜索所有文本文件(不包括隐藏文件)
  -u --unrestricted       搜索所有文件 (忽略 .ignore, .gitignore, etc.;
                          搜索二进制和隐藏文件)
  -U --skip-vcs-ignores   Ignore VCS ignore files
                          (.gitignore, .hgignore; still obey .ignore)
  -v --invert-match       反向匹配
  -w --word-regexp        只匹配整个单词
  -W --width NUM          Truncate match lines after NUM characters
  -z --search-zip         搜索压缩文件中的内容

File Types:
The search can be restricted to certain types of files. Example:
  ag --html needle   结果输出到指定类型文件
  - Searches for 'needle' in files with suffix .htm, .html, .shtml or .xhtml.

For a list of supported file types run:
  ag --list-file-types  列出支持的文件类型

实例

列出当前目录下包含 npm 的文件

1
2
3
4
5
➜  vue-project ag npm ./
README.md
16:npm install
22:npm run dev
28:npm run build