Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从某人那里得到了这个整洁的脚本:
find ../Classes -name \*.cpp -print
它只是循环一个目录,并递归地打印所有文件。但是,它不遵循符号链接。我在网上能找到的只有:
find ../Classes -name \*.cpp -type l -print
但是,由于目录是符号链接,而不是文件,所以它什么也不输出。我该如何解决?
告诉find跟随符号链接-L
find
-L
find -L ../Classes -name \*.cpp -print