• 投稿

60秒掌握Linux命令 (115) ripgrep

615
0
2026-04-28 08:25:00
16
4
19
1
给大家安利一下这个极其强大的命令行文本搜索神器——ripgrep (简称 rg)!它是一个用 Rust 编写的开源跨平台(支持 Windows, macOS, Linux)代码搜索工具。你可以把它看作是传统 grep 的现代“超级加强版”。 🌟 为什么推荐使用 ripgrep? ⚡ 极速搜索:得益于 Rust 强大的正则表达式引擎和高级底层优化(如使用 SIMD 指令的 Teddy 多模式匹配算法),它的搜索速度在同类工具(如 grep, ag, pt 等)中几乎处于碾压级别的领先,无论是在单文件还是在包含数十万个文件的庞大代码库中。 🧠 开箱即用的“智能”默认项:这是它备受开发者喜爱的原因之一。它默认会自动尊重你的 .gitignore 和 .rgignore 规则,并且自动跳过隐藏文件和二进制文件,让你无需每次都输入冗长的排除参数,就能得到最相关的搜索结果。 🌍 无缝的 Unicode 支持:全面支持 Unicode 字符搜索(甚至是像 \p{Greek} 这样的 Unicode 分类),更厉害的是,它能在保持极高搜索速度的同时处理 Unicode,不会像其他工具那样在开启此功能时产生严重的性能损耗。 💡 超实用的日常高频命令(CheatSheet): 基础搜索:rg "TODO" —— 在当前目录及其子目录下递归搜索包含 "TODO" 的文件。 忽略大小写:rg -i "image" —— 开启大小写不敏感搜索。 限定文件类型:rg -tpy "pattern" —— 只在特定类型的文件中搜索(例如 -tpy 代表仅在 Python 代码中搜索),排除其他干扰。 查看上下文:rg -C 2 "pattern" —— 显示匹配内容的上下文(前后各显示 2 行),帮你快速结合语境理解代码逻辑。 只看文件名:rg -l "pattern" —— 仅列出包含该内容的文件名,非常适合通过管道符配合其他程序(比如 Prettier 格式化工具)进行批量操作。 全盘搜索(不忽略任何文件):rg -uuu "pattern" —— 停用所有智能过滤,强制搜索包括隐藏文件、二进制文件和被忽略文件在内的所有内容,行为类似于传统的 grep -a -r。 如果你还没用过,非常推荐用包管理器(例如 Mac 上的 brew install ripgrep 或 Rust 的 cargo install ripgrep)安装体验一下,绝对能大幅提升你的开发效率! 大家平时都在用什么快捷工具或命令来搜索代码呢?欢迎在评论区一起交流补充!
分享各种计算机专业知识,侧重于底层技术
60秒掌握Linux命令
(115/180)
12.6万播放
简介
60秒掌握Linux命令(38)uname
01:19
60秒掌握Linux命令(37)uptime
02:08
60秒掌握Linux命令 (36) pkill
02:02
60秒掌握Linux命令(35) kill
01:37
60秒掌握Linux命令 (34) ps
01:45
60秒掌握Linux命令 (33) htop
01:30
60秒掌握Linux命令 (32)top
01:01
60秒掌握Linux命令 (31) sudo
00:58
60秒掌握Linux命令(30) echo
01:14
60秒掌握Linux命令(29)diff
01:02
60秒掌握Linux命令(26) sort
02:07
60秒掌握Linux命令(25)nano
01:57
60秒掌握Linux命令(24)vi vim
02:11
60秒掌握Linux命令(28)wc
01:09
60秒掌握Linux命令(23)AWK
01:57
60秒掌握Linux命令(22)sed
01:47
60秒掌握Linux命令(27)uniq
01:37
60秒掌握Linux命令(20)tail
01:14
60秒掌握Linux命令(19)head
01:44
60秒掌握Linux命令(18)less
02:06
60秒掌握Linux命令(17)more
01:10
60秒掌握Linux命令(16)cat
01:02
60秒掌握Linux命令 (21) grep
01:37
60秒掌握Linux命令(15)ln
01:54
60秒掌握Linux命令(14)tree
01:07
60秒掌握Linux命令(13)whereis
00:55
60秒掌握Linux命令(12)which
00:48
60秒掌握Linux命令(11)locate
01:53
60秒掌握Linux命令(10)find
02:22
60秒掌握Linux命令(9)touch
01:01
60秒掌握Linux命令(8)mv
01:12
60秒掌握Linux命令(7)rm
01:38
60秒掌握Linux命令(6)cp
01:33
60秒掌握Linux命令(5)rmdir
01:30
60秒掌握Linux命令(4)mkdir
01:45
60秒掌握Linux命令(3)pwd
02:04
60秒掌握Linux命令(2)cd
02:11
60秒掌握Linux命令 (1)ls
02:25
60秒掌握Linux命令(39)hostname
01:44
60秒掌握Linux命令(40)df
01:15
60秒掌握Linux命令 (41) ip
01:17
60秒掌握Linux命令 (42) ss
01:58
60秒掌握Linux命令 (43) ping
01:03
60秒掌握Linux命令(44)tcpdump
01:51
60秒掌握Linux命令(45)ethtool
01:30
60秒掌握Linux命令(46)brctl
01:57
60秒掌握Linux命令(47)tc
01:23
60秒掌握Linux命令(48)nc
01:31
60秒掌握Linux命令(49)curl
01:06
60秒掌握Linux命令(50)wget
02:14
60秒掌握Linux命令(51)dig
01:52
60秒掌握Linux命令(52)traceroute
01:35
60秒掌握Linux命令(53)route
01:07
60秒掌握Linux命令(54)dmesg
02:09
60秒掌握Linux命令(55)lsof
01:55
60秒掌握Linux命令(56)strace
02:06
60秒掌握Linux命令(57)perf
01:46
60秒掌握Linux命令(58) bpftool
01:18
60秒掌握Linux命令(59) vmstat
01:02
60秒掌握Linux命令(60) iostat
02:04
60秒掌握Linux命令(61)lsmod
01:40
60秒掌握Linux命令(62)free
01:37
60秒掌握Linux命令(63)lscpu
01:32
60秒掌握Linux命令(64)journalctl
01:50
60秒掌握Linux命令(65)tar
01:57
60秒掌握Linux命令(66)gzip
01:46
60秒掌握Linux命令(67)zip
01:37
60秒掌握Linux命令(68)unzip
01:25
60秒掌握Linux命令(69)scp
01:44
60秒掌握Linux命令(70)rsync
02:06
60秒掌握Linux命令(71)ssh
02:06
60秒掌握Linux命令(72)systemctl
01:50
60秒掌握Linux命令(73) nohup
01:39
60秒掌握Linux命令(74)jobs
01:54
60秒掌握Linux命令(75)fg
01:29
60秒掌握Linux命令(76) bg
02:00
60秒掌握Linux命令(77)watch
00:50
60秒掌握Linux命令(78) nsenter
02:21
60秒掌握Linux命令(79)unshare
02:29
60秒掌握Linux命令 (80) chmod
02:04
60秒掌握Linux命令 (81) chown
02:03
60秒掌握Linux命令 (82) chgrp
01:54
60秒掌握Linux命令 (83) useradd
02:23
60秒掌握Linux命令 (84) usermod
02:05
60秒掌握Linux命令 (85) passwd
01:35
60秒掌握Linux命令 (86) su
01:39
60秒掌握Linux命令 (87) du
01:45
60秒掌握Linux命令 (88) lsblk
01:50
60秒掌握Linux命令 (89) mount
01:13
60秒掌握Linux命令 (90) umount
01:18
60秒掌握Linux命令 (91) fdisk
01:38
60秒掌握Linux命令 (92) stat
01:27
60秒掌握Linux命令 (93) history
01:00
60秒掌握Linux命令(94) alias
01:59
60秒掌握Linux命令 (95) crontab
01:28
60秒掌握Linux命令(96)xargs
01:44
60秒掌握Linux命令(97)cut
01:35
60秒掌握Linux命令 (98) tee
01:47
60秒掌握Linux命令(99)date
02:23
60秒掌握Linux命令(100)clear
01:39
60秒掌握Linux命令 (101) export
06:38
60秒掌握Linux命令 (102) source
03:39
60秒掌握Linux命令(103)env
01:48
60秒掌握Linux命令 (104) ldd
04:23
60秒掌握Linux命令(105)make
04:26
60秒掌握Linux命令 (106)git
04:22
60秒掌握Linux命令 (107)docker
04:22
60秒掌握Linux命令 (108) tmux
02:58
60秒掌握Linux命令 (109) screen
03:13
60秒掌握Linux命令 (110) objdump
03:34
60秒掌握Linux命令 (111) readelf
03:39
60秒掌握Linux命令 (112) bat
04:00
60秒掌握Linux命令(113)exa
04:09
60秒掌握Linux命令 (114) fd
03:44
60秒掌握Linux命令 (115) ripgrep
03:56
60秒掌握Linux命令(116)duf
02:30
60秒掌握Linux命令 (118) procs
04:21
60秒掌握Linux命令 (117) tldr
03:42
60秒掌握Linux命令 (119) Bottom
01:56
60秒掌握Linux命令 (120) fzf:Linux_终极懒人搜索神器
01:36
60秒掌握Linux命令(121)HTTPie
01:23
60秒掌握Linux命令(122) setfacl
01:11
60秒掌握Linux命令(123)getfacl
00:54
60秒掌握Linux命令(124)sudoedit
01:57
60秒掌握Linux命令(125)umask
02:50
60秒掌握Linux命令(126)chattr
02:28
60秒掌握Linux命令(128) fail2ban-client
02:15
60秒掌握Linux命令(127)lsattr
02:56
60秒掌握Linux命令(129)iptables
02:56
60秒掌握Linux命令(130) nftables
03:30
60秒掌握Linux命令(131)openssl
02:37
60秒掌握Linux命令 (132) gpg
02:53
60秒掌握Linux命令(133)sysctl
03:41
60秒掌握Linux命令(134)lsns
03:12
60秒掌握Linux命令(135) nslookup
03:00
60秒掌握Linux命令 (136) nmap
03:19
60秒掌握Linux命令(137)time
03:12
60秒掌握Linux命令 (138) timeout
03:12
60秒掌握Linux命令 (139) taskset
04:19
60秒掌握Linux命令 (140)pstack
03:05
60秒掌握Linux命令(141)sar
02:50
60秒掌握Linux命令(143)basename
02:54
60秒掌握Linux命令(144)dirname
02:25
60秒掌握Linux命令(145)readlink
03:35
60秒掌握Linux命令(146)mktemp
03:32
60秒掌握Linux命令 (147) realpath
03:05
60秒掌握Linux命令(148)base64
02:53
60秒掌握Linux命令 (149) md5sum
03:39
60秒掌握Linux命令 (150) sha256sum
02:53
60秒掌握Linux命令(151)comm
02:15
60秒掌握Linux命令(153)split
03:06
60秒掌握Linux命令(152)shred
04:06
60秒掌握Linux命令(154)paste
02:38
60秒掌握Linux命令(155)pstree
03:03
60秒掌握Linux命令(156)ncdu
04:00
60秒掌握Linux命令 (157) fastfetch
04:31
60秒掌握Linux命令(158)pushd
03:53
60秒掌握Linux命令(159)rz
02:30
60秒掌握Linux命令(160)sz
03:37
60秒掌握Linux命令(161) killall
03:11
60秒掌握Linux命令 (162) c++filt
02:34
60秒掌握Linux命令 (162) c++filt---
02:25
60秒掌握Linux命令(164)type
02:33
60秒掌握Linux命令(165)tac
02:59
60秒掌握Linux命令 (166) ufw
03:48
60秒掌握Linux命令(171) nm
03:50
60秒掌握Linux命令(142)watchgnupg
02:35
60秒掌握Linux命令(167)last
02:51
60秒掌握Linux命令(168)zcat
02:46
60秒掌握Linux命令(169)zless
02:48
60秒掌握Linux命令(170)-_zgrep
02:32
60秒掌握Linux命令(172)valgrind
02:24
60秒掌握Linux命令(173)jq
02:13
60秒掌握Linux命令 (174)yq
02:34
60秒掌握Linux命令(175)tr
02:00
60秒掌握Linux命令(176)column
03:04
60秒掌握Linux命令(177)nl
02:24
60秒掌握Linux命令(178)join
02:46
60秒掌握Linux命令(179)fold
02:20
60秒掌握Linux命令(180)rev
02:11
客服
顶部
赛事库 课堂 2021拜年纪