FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    time command doesn't accept any options..is this my fault?

    Hi all,

    I'm using Fedora 27.

    I am wondering why I cannot add options to time command. For example,
    Code:
    time -o time.txt df
    should write the elapsed time by df comand to time.txt, but the actual result is
    Code:
    $time -o time.txt
    bash: -o: command not found...
    
    real	0m0.337s
    user	0m0.009s
    sys	0m0.001s
    Not only time doesn't accept the option, but it doesn't execute df command.

    How should I use it correctly?

    Thanks in advance!
    Luckiest in the world! Radiologist in Japan.

  2. #2
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    Re: time command doesn't accept any options..is this my fault?

    Self reply.

    I saw man page, and found it accepts only -p option!! Why?
    Luckiest in the world! Radiologist in Japan.

  3. #3
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,901

    Re: time command doesn't accept any options..is this my fault?

    There are two versions of time - one is built into bash and provides just the minimal version you are seeing.
    If you specify /usr/bin/time you will probably* get the full Gnu version.

    [*] I'm not on Fedora so cannot check.

    User error. Please replace user and try again

  4. #4
    Join Date
    Apr 2018
    Location
    California
    Posts
    27

    Re: time command doesn't accept any options..is this my fault?

    This is confirms ocratato's post...

    $ /usr/bin/time --help
    Usage: /usr/bin/time [-apvV] [-f format] [-o file] [--append] [--verbose]
    [--portability] [--format=format] [--output=file] [--version]
    [--help] command [arg...]

    $ time --help
    bash: --help: command not found...

    real 0m1.320s
    user 0m0.013s
    sys 0m0.011s

  5. #5
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    Re: time command doesn't accept any options..is this my fault?

    Quote Originally Posted by ocratato
    There are two versions of time - one is built into bash and provides just the minimal version you are seeing.
    If you specify /usr/bin/time you will probably* get the full Gnu version.

    [*] I'm not on Fedora so cannot check.
    Thank you ocratato.

    /usr/bin/time is what I want!!

    Thank you very much!
    Luckiest in the world! Radiologist in Japan.

Similar Threads

  1. [SOLVED]
    Authentication asked but doesn't accept any password
    By camilobm23 in forum Using Fedora
    Replies: 3
    Last Post: 24th October 2015, 10:52 PM
  2. program accept argument from both stdin and command line
    By spskhokhar in forum Programming & Packaging
    Replies: 3
    Last Post: 10th July 2012, 07:35 PM
  3. Replies: 1
    Last Post: 11th April 2010, 11:35 AM
  4. Replies: 3
    Last Post: 10th July 2007, 11:46 PM
  5. time command in FC2 does not accept options
    By freakx in forum Using Fedora
    Replies: 4
    Last Post: 19th August 2005, 09:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •