我想找到所有不同的.gitignore文件,我必须将它们组合成一个文件。
我尝试了像find */**/.gitignore这样的东西,但什么也没有得到。
所有的文件都在我当前目录下的子目录下,以及当前目录下。
我在linux上使用Bash
发布于 2011-06-24 23:43:41
find -name .gitignore这应该可以了。
由于您使用的是bash:
shopt -s globstar
echo **/.gitignore来自man bash
globstar
If set, the pattern ** used in a pathname expansion context will match a
files and zero or more directories and subdirectories. If the pattern is
followed by a /, only directories and subdirectories match.发布于 2011-06-24 23:48:50
尝尝这个
find /home/user1 -name 'result.out' 2>/dev/null在你的情况下
find /<your DIR> -name '*.gitignore' 2>/dev/null这会导致
/home/user1/result.out
/home/user1/dir1/result.out
/home/user1/dir2/result.outhttps://stackoverflow.com/questions/6470258
复制相似问题