[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #54745] -mount needs to be slightly different from -xdev
From: |
Eric Blake |
Subject: |
[bug #54745] -mount needs to be slightly different from -xdev |
Date: |
Thu, 27 Sep 2018 11:31:37 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0 |
URL:
<https://savannah.gnu.org/bugs/?54745>
Summary: -mount needs to be slightly different from -xdev
Project: findutils
Submitted by: ericb
Submitted on: Thu 27 Sep 2018 09:31:35 AM MDT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: None
Fixed Release: None
_______________________________________________________
Details:
Today during the Austin Group meeting (the folks responsible for POSIX), it
was decided that -mount and -xdev should have a subtle difference in behavior,
in order to reconcile some differences between implementations and against
some other file-traversal programs like pax (the POSIX replacement to tar).
The difference stems on the question of whether, when requesting that a
cross-device file system entry (whether a mount point, or whether a symlink
that crosses mount points when -L follows symlinks), should be visited or
omitted during the traversal. Both styles have their merits. Quoting from
the discussion results:
http://austingroupbugs.net/view.php?id=1133
"
When restricting the search to files on one file system, it can sometimes
be desirable for the crossing points themselves to be acted on and sometimes
for them not to be acted on. (Crossing points are mount points and, if the -L
option is specified, symbolic links to directories on other file systems.) The
-xdev primary acts on them and the -mount primary does not. However, -mount
also does not act on symbolic links to non-directory files on other file
systems (if -L is specified). If there is a need for an application to exclude
crossing points but include symbolic links to non-directory files on other
file systems, this can be achieved by using two find commands as follows:
find -L dir -mount -type d -print
find -L dir -xdev ! -type d -print
(in a subshell whose output is piped to sort, if the order matters).
If both -mount and -xdev are specified, find obeys both primaries but the
end result is the same as if -xdev were not specified.
"
We'll need to patch GNU findutils to match, in order to make -mount skip
crossing points (while keeping -xdev with its behavior of visiting crossing
points).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54745>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #54745] -mount needs to be slightly different from -xdev,
Eric Blake <=