You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output differs system to system regardless of the find implementation (BSD vs GNU) that is used.
Overview
This is less of a bug report and more of a FYI for others going through the book. No matter the version of find that I tested with the output did not match what the book shows.
$ git clone https://github.com/kyclark/command-line-rust
$ cd command-line-rust/07_findr/tests/inputs
$ find .../a./a/a.txt./a/b./a/b/b.csv./a/b/c./a/b/c/c.mp3./g.csv./f./f/f.txt./d./d/d.tsv./d/d.txt./d/e./d/e/e.mp3./d/b.csv
Ubuntu 22.04 (WSLv2)
$ git clone https://github.com/kyclark/command-line-rust
$ cd command-line-rust/07_findr/tests/inputs
$ find .../g.csv./d./d/b.csv./d/e./d/e/e.mp3./d/d.txt./d/d.tsv./f./f/f.txt./a./a/a.txt./a/b./a/b/c./a/b/c/c.mp3./a/b/b.csv
FreeBSD 14
$ git clone https://github.com/kyclark/command-line-rust
$ cd command-line-rust/07_findr/tests/inputs
$ find .../a./a/a.txt./a/b./a/b/b.csv./a/b/c./a/b/c/c.mp3./d./d/b.csv./d/d.tsv./d/d.txt./d/e./d/e/e.mp3./f./f/f.txt./g.csv
Thus far I've been using tools provided by a FreeBSD 14 VM as a reference for the BSD version of each tool covered by the book. Having a BSD version of the tools to contrast against the GNU version of the tools on an Ubuntu instance has been very helpful as I've gone through the exercises.
Explanation
Based on light research, the default find sort order appears to be based on the order items are stored within the directory entries. As noted in the serverfault.com Q/A below, the sort order should ordinarily be stable for the same machine but is subject to change if the filesystem entries are modified as part of maintenance operations.
TL; DR
The output differs system to system regardless of the
find
implementation (BSD vs GNU) that is used.Overview
This is less of a bug report and more of a FYI for others going through the book. No matter the version of
find
that I tested with the output did not match what the book shows.Version of repo used:
From the book
CH7, page 144-145 (epub) of the book notes that the BSD
find
output is on the left with GNU version on Linux on the right:Ubuntu 20.04 (WSLv2)
Ubuntu 22.04 (WSLv2)
FreeBSD 14
Thus far I've been using tools provided by a FreeBSD 14 VM as a reference for the BSD version of each tool covered by the book. Having a BSD version of the tools to contrast against the GNU version of the tools on an Ubuntu instance has been very helpful as I've gone through the exercises.
Explanation
Based on light research, the default
find
sort order appears to be based on the order items are stored within the directory entries. As noted in the serverfault.com Q/A below, the sort order should ordinarily be stable for the same machine but is subject to change if the filesystem entries are modified as part of maintenance operations.References:
The text was updated successfully, but these errors were encountered: