Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/usr/bin/time: No such file or directory

I'm trying to run the time command for a file on a virtual machine running Fedora 19 64-bit and I get the message "/usr/bin/time: No such file or directory". I tried googling, but it appears it's something that I should already have. How do I get this on my computer?

like image 655
ShadowCrossZero Avatar asked Nov 29 '13 03:11

ShadowCrossZero


2 Answers

For those on a raspberry pi or similar debian-based distributions, I found that I could install the package time (sudo apt install time) to obtain access to the time command.

Edit: For Fedora-based systems, the package name might be different. Try a dnf search time, followed by a sudo dnf install {package_name}. I don't have a Fedora machine immediately to hand to get the exact package name from.

like image 145
starbeamrainbowlabs Avatar answered Sep 24 '22 21:09

starbeamrainbowlabs


bash/zsh/modern shells usually implement a basic time command as a builtin. So it won't exist on the filesystem, but time mycommand should work.

If you want the "proper" time command (with more options eg: -l/-v), then you'll need to install it via apt/yum/etc. You'll need to run it as /usr/bin/time mycommand so the shell-builtin doesn't get invoked.

like image 1
rcoup Avatar answered Sep 25 '22 21:09

rcoup