Suppose I have a directory /dir inside which there are 3 symlinks to other directories /dir/dir11, /dir/dir12, and /dir/dir13. I want to list all the files in dir including the ones in dir11, dir12 and dir13.
To be more generic, I want to list all files including the ones in the directories which are symlinks. find ., ls -R, etc stop at the symlink without navigating into them to list further.
The
-Loption tolswill accomplish what you want. It dereferences symbolic links.So your command would be:
You can also accomplish this with
The
-followoption directs find to follow symbolic links to directories.On Mac OS X use
as
-followhas been deprecated.