Description of problem: $ echo $LANG ru_RU.UTF-8 $ time -a -o /tmp/test.res -- ./stack_test &> /tmp/test.res real 0m1.423s user 0m0.009s sys 0m0.007s $ cat /tmp/test.res bash: -a: команда не найдена... It means "-a: command not found" Version-Release number of selected component (if applicable): $ LANG=en rpm -qi time Name : time Version : 1.7 Release : 49.fc24 Architecture: x86_64 Install Date: Tue Jan 10 13:55:54 2017 Group : Applications/System Size : 47702 License : GPLv2+ Signature : RSA/SHA256, Fri Apr 1 18:01:23 2016, Key ID 4089d8f2fdb19c98 Source RPM : time-1.7-49.fc24.src.rpm Build Date : Fri Feb 5 11:26:33 2016 Build Host : buildvm-02-nfs.phx2.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : http://www.gnu.org/software/time/ Summary : A GNU utility for monitoring a program's use of system resources Description : The GNU time utility runs another program, collects information about the resources used by that program while it is running, and displays the results. The package came with system upgrade from fc24. It wasn't upgraded during fedora upgrade fc24 to fc25. time-1.7...fc24 is the latest available in fedora repositories. How reproducible: Set LANG to any other than en_EN. I'm sure what exactly ru_RU locale gives a fail. Steps to Reproduce: 1. 2. 3. Actual results: A failure. Expected results: Unlocalized output into the file. Additional info:
What shell do you execute the time command from? I suspect that you invoke a shell built-in command, not /usr/bin/time from time package. In case of bash: $ type -a time time is a shell keyword $ help time time: time [-p] pipeline Report time consumed by pipeline's execution. Hence tries to execute "-a -o /tmp/test.res -- ./stack_test" command.
$ LANG=en_US type -a time time is a shell keyword time is /usr/bin/time If I understood correctly, variables in prefix run command in */bin/ instead of built-in, right? BTW, thanks a lot. So, this issue not a bug and could be closed. Regards, Alexandr.
Yes, if you specify the command with a path, e.g. /usr/bin/time, then the shell will execute a program from that file. If you specify the command without a path, e.g. time, your shell will use its internal implementation that does not support the "-a" option.