I want to find all the file names present in SVN t

2019-08-21 17:59发布

问题:

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

What is it doing wrong?

回答1:

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.



标签: shell unix svn