Skip to content

Conversation

@phiresky
Copy link

@phiresky phiresky commented Nov 20, 2025

It can be very useful to output metadata in fd, just like you can in find:

$ find -printf '%s %p\n'
123 foo
456 bar

This adds the same option to fd:

$ fd --format '{size} {}'
123 foo
456 bar

stat() is only called if necessary (i.e. not for inode). This can easily be expanded to allow more metadata outputting, such as modified date, file type, permissions. Those would have an open question how to format them though, so this only adds two obvious ones.

An -l option already exists, but it requires an external tool, is inflexible and inefficient on large directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant