你如何排除 grep 中的符号链接? [英] How do you exclude symlinks in a grep?

查看:18
本文介绍了你如何排除 grep 中的符号链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想 grep -R 一个目录但排除符号链接我该怎么做?

I want to grep -R a directory but exclude symlinks how dow I do it?

也许像 grep -R --no-symlinks 之类的东西?

Maybe something like grep -R --no-symlinks or something?

谢谢.

推荐答案

Gnu grep v2.11-8 及以上 如果使用 -r 排除未在命令行中指定的符号链接,并在使用 -R 调用时包括它们.

Gnu grep v2.11-8 and on if invoked with -r excludes symlinks not specified on the command line and includes them when invoked with -R.

这篇关于你如何排除 grep 中的符号链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆