Skip to content

du: should support arbitrary format arg to --time-style #7665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jfinkels opened this issue Apr 5, 2025 · 2 comments · May be fixed by #7687
Open

du: should support arbitrary format arg to --time-style #7665

jfinkels opened this issue Apr 5, 2025 · 2 comments · May be fixed by #7687
Labels

Comments

@jfinkels
Copy link
Collaborator

jfinkels commented Apr 5, 2025

Environment: Ubuntu 24.04, uutils main branch (git commit 3971bb3), GNU coreutils v9.6.38-2b088-modified

Steps to reproduce:

touch f
du --time --time-style='+%Y-%m-%d' f

What happens now: uutils du errors with usage information:

./target/debug/du: invalid argument '+%Y-%m-%d' for 'time style'
Valid arguments are:
- 'full-iso'
- 'long-iso'
- 'iso'
Try './target/debug/du' for more information.

What I expected to happen: uutils du prints the file size, formatted modification time, and filename:

0       2025-04-05      f

Notes: this is causing a failure in GNU test file tests/misc/time-style.sh.

@jfinkels jfinkels added the U - du label Apr 5, 2025
@drinkcat
Copy link
Contributor

drinkcat commented Apr 5, 2025

For reference, ls supports such time styles, so we should find a way to reuse the code.

@jfinkels
Copy link
Collaborator Author

jfinkels commented Apr 5, 2025

And apparently pr also has a similar -D FORMAT option.

@Qelxiros Qelxiros linked a pull request Apr 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants