|
From: | Arthur Pogosyan |
Subject: | [bug #56410] find -L doesn't follow symlinks outside the specified search scope |
Date: | Thu, 30 May 2019 02:56:00 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36 |
Follow-up Comment #7, bug #56410 (project findutils): I've modified your script a little: #!/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 echo "(ends)" echo echo without -L find temp2/ -type f 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 So that i didn't do anything with found files and not using {}. But still with -L option it shows me symlink instead of text file. Here's output script produced: address@hidden:~# bash test.sh with -L temp2/file (ends) without -L (ends) with -L ... -exec file temp2/file: symbolic link to ../temp/file0.txt (ends) /tmp/tmp.ap8ae5weXs: total 8 drwxr-xr-x 2 root root 4096 May 30 09:52 temp drwxr-xr-x 2 root root 4096 May 30 09:52 temp2 /tmp/tmp.ap8ae5weXs/temp: total 4 -rw-r--r-- 1 root root 5 May 30 09:52 file0.txt /tmp/tmp.ap8ae5weXs/temp2: total 0 lrwxrwxrwx 1 root root 17 May 30 09:52 file -> ../temp/file0.txt _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?56410> _______________________________________________ Сообщение отправлено по Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |