---
title: "Linux下怎样查找包含**的文件"
author: "codingstandards"
date: "2013-02-20T15:25:34Z"
tags: []
categories: ["操作系统"]
slug: "linux"
draft: false
lastmod: "2013-02-20T15:25:34Z"
id: 1810049
url: "https://codingstandards.iteye.com/blog/1810049"
---

在Linux下，查找包含字符串的文件使用的命令是grep。如果要查找包含\*\*的文件，使用grep \** file是不行的，因为grep认为\*\*是正则表达式，结果不可预料。正确的做法是：

```
grep '\*\*' file
```

比如：

```
[root@qzw www.vktone.com]# grep '\*\*' *.html */*.html >filtered.txt
[root@qzw www.vktone.com]# 

```

 

 

- 源文【Linux下怎样查找包含\*\*的文件】最新版，请访问：  
     [http://www.vktone.com/articles/linux-search-two-stars.html](http://www.vktone.com/articles/linux-search-two-stars.html)