Skip to content
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

Make time available in the CLI #693

Closed
johnbillion opened this issue Oct 13, 2022 · 1 comment
Closed

Make time available in the CLI #693

johnbillion opened this issue Oct 13, 2022 · 1 comment
Assignees
Labels
developer advocacy Developer Advocacy related tasks

Comments

@johnbillion
Copy link
Member

time is useful for timing how long a CLI command took and then using that time for planning things in the future. Unfortunately it's not installed on the cloud servers.

Can time be made available on the CLI please?

@missjwo missjwo added the developer advocacy Developer Advocacy related tasks label Dec 10, 2024
@mikelittle mikelittle self-assigned this Jan 22, 2025
@mikelittle
Copy link
Contributor

After some research, it looks like the version of bash included with Debian bookworm includes a built-in time command (technically a reserved keyword) https://www.gnu.org/software/bash/manual/html_node/Pipelines.html#index-time

Hence, you can already run commands like this:

www-data@581a658a7bdb:/usr/src/app$ time find / -type f -name 'notfound'
find: '/etc/polkit-1/rules.d': Permission denied
find: '/etc/ssl/private': Permission denied
find: '/proc/tty/driver': Permission denied
find: '/root': Permission denied
find: '/usr/share/polkit-1/rules.d': Permission denied
find: '/var/cache/apt/archives/partial': Permission denied
find: '/var/cache/ldconfig': Permission denied
find: '/var/lib/apt/lists/partial': Permission denied

real    0m0.747s
user    0m0.053s
sys     0m0.158s
www-data@581a658a7bdb:/usr/src/app$ 

CleanShot 2025-01-22 at 13.02.07@2x.png

Closing as already fulfilled. Please re-open if there is a requirement for the external time binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer advocacy Developer Advocacy related tasks
Projects
None yet
Development

No branches or pull requests

3 participants