Repository navigation
find: show allocated blocks and symlink targets in -ls - #916
Conversation
The blocks column was the size rounded up to 4 KiB, so a sparse file showed its full size and a directory always 4; it now comes from st_blocks like GNU find. A symlink is followed by -> and its target.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #916 +/- ##
==========================================
+ Coverage 92.59% 92.60% +0.01%
==========================================
Files 37 37
Lines 7766 7764 -2
Branches 394 394
==========================================
- Hits 7191 7190 -1
+ Misses 435 434 -1
Partials 140 140 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for your PR |
Two columns of
-lsdiffer from GNU find 4.10.0:The blocks column was the size rounded up to 4 KiB, so a sparse file showed its full size and every small file or directory showed 4 (GNU shows 0 for both on tmpfs). It now uses
st_blocksin 1 KiB units. A symlink is now followed by->and its target.New test
find_ls_shows_allocated_blocks_and_link_target(fails on main) compares the blocks column withst_blocksand checks the target.cargo testpasses (431), clippy is clean. On ext4,-lsof a directory with a sparse file, a one-byte file, a subdirectory and a symlink gives the same inode-less columns as GNU (blocks, mode, links, owner, group, size, name); the date column is left to #904.