jlanik
jlanik

Reputation: 939

find does not descend to some directories

find . should, according to my knowledge print out recursively everything in the current directory, however when I use it in a directory I'm getting the following

.
./WORKSPACE
./bazel-out
./lib
./lib/BUILD
./lib/hello-time.h
./lib/hello-time.cc
./main
./main/BUILD
./main/hello-world.cc
./main/hello-greet.h
./main/hello-greet.cc
./bazel-stage3
./bazel-bin
./bazel-testlogs
./README.md
./bazel-genfiles

however, this is not everything -- at least the folder bazel-bin contains some files. Actually, if I run find bazel-bin, this is what I get:

bazel-bin/
bazel-bin/lib
bazel-bin/lib/_objs
bazel-bin/lib/_objs/hello-time
bazel-bin/lib/_objs/hello-time/hello-time.pic.d
bazel-bin/lib/_objs/hello-time/hello-time.pic.o
bazel-bin/lib/libhello-time.a
bazel-bin/lib/libhello-time.a-2.params
bazel-bin/main
bazel-bin/main/_objs
bazel-bin/main/_objs/hello-greet
bazel-bin/main/_objs/hello-greet/hello-greet.pic.o
bazel-bin/main/_objs/hello-greet/hello-greet.pic.d
bazel-bin/main/_objs/hello-world
bazel-bin/main/_objs/hello-world/hello-world.pic.o
bazel-bin/main/_objs/hello-world/hello-world.pic.d
bazel-bin/main/libhello-greet.so
bazel-bin/main/hello-world.runfiles_manifest
bazel-bin/main/libhello-greet.so-2.params
bazel-bin/main/hello-world-2.params
bazel-bin/main/libhello-greet.a-2.params
bazel-bin/main/hello-world.runfiles
bazel-bin/main/hello-world.runfiles/__main__
bazel-bin/main/hello-world.runfiles/__main__/main
bazel-bin/main/hello-world.runfiles/__main__/main/hello-world
bazel-bin/main/hello-world.runfiles/MANIFEST
bazel-bin/main/libhello-greet.a
bazel-bin/main/hello-world

Why the find . does not descend into bazel-bin?

Thank you.

Upvotes: 1

Views: 101

Answers (1)

spartygw
spartygw

Reputation: 3452

My bet is that bezel-bin is a soft link within your current directory.

Find will not traverse the soft link. You should try find . -follow

Upvotes: 2

Related Questions