我想找到 SVN 中包含空格和特殊字符的所有文件名 [英] I want to find all the file names present in SVN that contain spaces and special characters

查看:54
本文介绍了我想找到 SVN 中包含空格和特殊字符的所有文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找到 SVN 中包含空格和特殊字符的所有文件名,并将它们放在 temp.txt 中.我没有办法.我还需要在子文件夹中查找文件名.

I want to find all the file names present in SVN that contain spaces and special characters and put them in temp.txt. I don't have a path for that. I need to find file names in subfolders as well.

我尝试了以下命令,但它不起作用.

I tried the following command, but it is not working.

find.-type f|egrep-i"~||&|@|#|<|>|;|:|!|'^'|,|-|_"|tee temp.txt

它做错了什么?

推荐答案

你的正则表达式是错误的.试试这个:

You're regex is wrong. Try this:

find . -type f | egrep -i "[-~&@#<>;:!^,_]" | tee temp.txt

您想指定要查找的字符,而这正是 [] 的用途.我可能漏掉了你说的几个字符,所以仔细检查一下,我把它们都包括了.

You want to specify the characters to find and that is just what [] is for. I may have missed a few characters you meant, so double check I included them all.

另请注意,此命令将查找目录中的任何文件 - 它可能是也可能不是存储库的一部分.

Also note that this command will find any file in the directory - it may or may not be part of the repo.

这篇关于我想找到 SVN 中包含空格和特殊字符的所有文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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