time not accepting arguments












1















I installed time but when I use it, I am getting the portable format, not the default format. When installed I think it said GNU time 1.7 or 1.72.



Commands like



time --help
time --version


fail with the error "command not found". The TIME environment variable is unset. Why is time behaving like this?










share|improve this question


















  • 2





    time is a shell keyword, you probably have to point to the full path of the installed time to use it: /usr/bin/time --version or maybe alias it.

    – Jesse_b
    4 hours ago













  • Is it possible you already have an alias for time='time -p' that would explain the portable format?

    – Jesse_b
    4 hours ago











  • @Jesse_b no alias. I think it is using the bash keyword 'time' which apparently is identical to time -p

    – Tyler Durden
    4 hours ago











  • On my system the time builtin still has a -p option to print portable.

    – Jesse_b
    3 hours ago
















1















I installed time but when I use it, I am getting the portable format, not the default format. When installed I think it said GNU time 1.7 or 1.72.



Commands like



time --help
time --version


fail with the error "command not found". The TIME environment variable is unset. Why is time behaving like this?










share|improve this question


















  • 2





    time is a shell keyword, you probably have to point to the full path of the installed time to use it: /usr/bin/time --version or maybe alias it.

    – Jesse_b
    4 hours ago













  • Is it possible you already have an alias for time='time -p' that would explain the portable format?

    – Jesse_b
    4 hours ago











  • @Jesse_b no alias. I think it is using the bash keyword 'time' which apparently is identical to time -p

    – Tyler Durden
    4 hours ago











  • On my system the time builtin still has a -p option to print portable.

    – Jesse_b
    3 hours ago














1












1








1








I installed time but when I use it, I am getting the portable format, not the default format. When installed I think it said GNU time 1.7 or 1.72.



Commands like



time --help
time --version


fail with the error "command not found". The TIME environment variable is unset. Why is time behaving like this?










share|improve this question














I installed time but when I use it, I am getting the portable format, not the default format. When installed I think it said GNU time 1.7 or 1.72.



Commands like



time --help
time --version


fail with the error "command not found". The TIME environment variable is unset. Why is time behaving like this?







arch-linux time






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 5 hours ago









Tyler DurdenTyler Durden

1,61042250




1,61042250








  • 2





    time is a shell keyword, you probably have to point to the full path of the installed time to use it: /usr/bin/time --version or maybe alias it.

    – Jesse_b
    4 hours ago













  • Is it possible you already have an alias for time='time -p' that would explain the portable format?

    – Jesse_b
    4 hours ago











  • @Jesse_b no alias. I think it is using the bash keyword 'time' which apparently is identical to time -p

    – Tyler Durden
    4 hours ago











  • On my system the time builtin still has a -p option to print portable.

    – Jesse_b
    3 hours ago














  • 2





    time is a shell keyword, you probably have to point to the full path of the installed time to use it: /usr/bin/time --version or maybe alias it.

    – Jesse_b
    4 hours ago













  • Is it possible you already have an alias for time='time -p' that would explain the portable format?

    – Jesse_b
    4 hours ago











  • @Jesse_b no alias. I think it is using the bash keyword 'time' which apparently is identical to time -p

    – Tyler Durden
    4 hours ago











  • On my system the time builtin still has a -p option to print portable.

    – Jesse_b
    3 hours ago








2




2





time is a shell keyword, you probably have to point to the full path of the installed time to use it: /usr/bin/time --version or maybe alias it.

– Jesse_b
4 hours ago







time is a shell keyword, you probably have to point to the full path of the installed time to use it: /usr/bin/time --version or maybe alias it.

– Jesse_b
4 hours ago















Is it possible you already have an alias for time='time -p' that would explain the portable format?

– Jesse_b
4 hours ago





Is it possible you already have an alias for time='time -p' that would explain the portable format?

– Jesse_b
4 hours ago













@Jesse_b no alias. I think it is using the bash keyword 'time' which apparently is identical to time -p

– Tyler Durden
4 hours ago





@Jesse_b no alias. I think it is using the bash keyword 'time' which apparently is identical to time -p

– Tyler Durden
4 hours ago













On my system the time builtin still has a -p option to print portable.

– Jesse_b
3 hours ago





On my system the time builtin still has a -p option to print portable.

– Jesse_b
3 hours ago










3 Answers
3






active

oldest

votes


















2














When looking for a command the shell uses the following preference:




  1. aliases

  2. Parameter expansion, command substitution, arithmetic expansion, and quote removal before being assigned to the variable

  3. functions

  4. BUILTIN commands

  5. HASH table

  6. Search PATH


So the time keyword will be used with preference over the installed version of time presumably found in your PATH. You can overcome this with an alias.






share|improve this answer































    2














    While Jesse_b is correct about how shells generally look up commands, there's an easier fix.



    time --version


    Bash, ksh, zsh, and I believe a few other common shells will treat a leading backslash on a command with no path as 'skip to looking into the PATH for this thing.'



    Also, knowing what the time builtin is, we could also get around this by running



    time time --version


    After all, the reason for the command not found error rather than a no such option error is because the shell builtin just runs the command that follows and checks how long it took to run when it finishes... which is the same thing that /bin/time does.



    If you're expecting time to take arguments... are you wanting to find out what time it is? Because that's the date command.






    share|improve this answer































      0














      Use:



      builtin type time


      to see which version of time you're running.






      share|improve this answer























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "106"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497094%2ftime-not-accepting-arguments%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        2














        When looking for a command the shell uses the following preference:




        1. aliases

        2. Parameter expansion, command substitution, arithmetic expansion, and quote removal before being assigned to the variable

        3. functions

        4. BUILTIN commands

        5. HASH table

        6. Search PATH


        So the time keyword will be used with preference over the installed version of time presumably found in your PATH. You can overcome this with an alias.






        share|improve this answer




























          2














          When looking for a command the shell uses the following preference:




          1. aliases

          2. Parameter expansion, command substitution, arithmetic expansion, and quote removal before being assigned to the variable

          3. functions

          4. BUILTIN commands

          5. HASH table

          6. Search PATH


          So the time keyword will be used with preference over the installed version of time presumably found in your PATH. You can overcome this with an alias.






          share|improve this answer


























            2












            2








            2







            When looking for a command the shell uses the following preference:




            1. aliases

            2. Parameter expansion, command substitution, arithmetic expansion, and quote removal before being assigned to the variable

            3. functions

            4. BUILTIN commands

            5. HASH table

            6. Search PATH


            So the time keyword will be used with preference over the installed version of time presumably found in your PATH. You can overcome this with an alias.






            share|improve this answer













            When looking for a command the shell uses the following preference:




            1. aliases

            2. Parameter expansion, command substitution, arithmetic expansion, and quote removal before being assigned to the variable

            3. functions

            4. BUILTIN commands

            5. HASH table

            6. Search PATH


            So the time keyword will be used with preference over the installed version of time presumably found in your PATH. You can overcome this with an alias.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 4 hours ago









            Jesse_bJesse_b

            12.4k23066




            12.4k23066

























                2














                While Jesse_b is correct about how shells generally look up commands, there's an easier fix.



                time --version


                Bash, ksh, zsh, and I believe a few other common shells will treat a leading backslash on a command with no path as 'skip to looking into the PATH for this thing.'



                Also, knowing what the time builtin is, we could also get around this by running



                time time --version


                After all, the reason for the command not found error rather than a no such option error is because the shell builtin just runs the command that follows and checks how long it took to run when it finishes... which is the same thing that /bin/time does.



                If you're expecting time to take arguments... are you wanting to find out what time it is? Because that's the date command.






                share|improve this answer




























                  2














                  While Jesse_b is correct about how shells generally look up commands, there's an easier fix.



                  time --version


                  Bash, ksh, zsh, and I believe a few other common shells will treat a leading backslash on a command with no path as 'skip to looking into the PATH for this thing.'



                  Also, knowing what the time builtin is, we could also get around this by running



                  time time --version


                  After all, the reason for the command not found error rather than a no such option error is because the shell builtin just runs the command that follows and checks how long it took to run when it finishes... which is the same thing that /bin/time does.



                  If you're expecting time to take arguments... are you wanting to find out what time it is? Because that's the date command.






                  share|improve this answer


























                    2












                    2








                    2







                    While Jesse_b is correct about how shells generally look up commands, there's an easier fix.



                    time --version


                    Bash, ksh, zsh, and I believe a few other common shells will treat a leading backslash on a command with no path as 'skip to looking into the PATH for this thing.'



                    Also, knowing what the time builtin is, we could also get around this by running



                    time time --version


                    After all, the reason for the command not found error rather than a no such option error is because the shell builtin just runs the command that follows and checks how long it took to run when it finishes... which is the same thing that /bin/time does.



                    If you're expecting time to take arguments... are you wanting to find out what time it is? Because that's the date command.






                    share|improve this answer













                    While Jesse_b is correct about how shells generally look up commands, there's an easier fix.



                    time --version


                    Bash, ksh, zsh, and I believe a few other common shells will treat a leading backslash on a command with no path as 'skip to looking into the PATH for this thing.'



                    Also, knowing what the time builtin is, we could also get around this by running



                    time time --version


                    After all, the reason for the command not found error rather than a no such option error is because the shell builtin just runs the command that follows and checks how long it took to run when it finishes... which is the same thing that /bin/time does.



                    If you're expecting time to take arguments... are you wanting to find out what time it is? Because that's the date command.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 1 hour ago









                    Ed GrimmEd Grimm

                    2035




                    2035























                        0














                        Use:



                        builtin type time


                        to see which version of time you're running.






                        share|improve this answer




























                          0














                          Use:



                          builtin type time


                          to see which version of time you're running.






                          share|improve this answer


























                            0












                            0








                            0







                            Use:



                            builtin type time


                            to see which version of time you're running.






                            share|improve this answer













                            Use:



                            builtin type time


                            to see which version of time you're running.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 54 mins ago









                            Tom HaleTom Hale

                            6,74833694




                            6,74833694






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f497094%2ftime-not-accepting-arguments%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                404 Error Contact Form 7 ajax form submitting

                                How to know if a Active Directory user can login interactively

                                TypeError: fit_transform() missing 1 required positional argument: 'X'