|
From: | James Youngman |
Subject: | [bug #56410] find -L doesn't follow symlinks outside the specified search scope |
Date: | Wed, 29 May 2019 06:42:23 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36 |
Follow-up Comment #3, bug #56410 (project findutils): Oops, here is a corrected script (the previous one had a missing "!" in the if. #!/bin/bash set -u if ! top="$(mktemp -d)"; then echo "Failed to create a temporary directory" >&2; exit 1; fi ( set -eCu cd "${top}" mkdir temp temp2 echo "test" >| temp/file0.txt ( cd temp2 && ln -s ../temp/file0.txt file ) if ! wc -c < temp2/file >/dev/null ; then exit 1; fi echo echo with -L find -L temp2/ -type f -ls echo "(ends)" echo echo without -L find temp2/ -type f -ls echo "(ends)" echo echo with -L ... -exec file find -L temp2/ -type f -exec file '{}' \; echo "(ends)" echo ) rv=$? ls -ltR "${top}" rm -rf "${top}" exit $rv _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56410> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |