SORU
22 Aralık 2008, PAZARTESİ


Programın çalışması kabuğunda zaman

Bir kaç farklı koşullarda bir linux kabuk içinde bir şey çalıştırmak istiyorum, ve her yürütme yürütme zamanı Çıkış yapamaz.

Bu yapardı, ama kabuk içinde yapabilirim bir yol olduğunu bir perl veya python betiği yazabilirim biliyorum? bash olur

CEVAP
22 Aralık 2008, PAZARTESİ


Kullanın yerleşik zaman komut:

$ help time

time: time [-p] PIPELINE
    Execute PIPELINE and print a summary of the real time, user CPU time,
    and system CPU time spent executing PIPELINE when it terminates.
    The return status is the return status of PIPELINE.  The `-p' option
    prints the timing summary in a slightly different format.  This uses
    the value of the TIMEFORMAT variable as the output format.
times: times
    Print the accumulated user and system times for processes run from
    the shell.

Örnek:

$ time sleep 2
real    0m2.009s
user    0m0.000s
sys     0m0.004s

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • EmbarkToHeaven

    EmbarkToHeav

    3 EYLÜL 2007
  • We've moved!

    We've moved!

    7 Ocak 2008
  • jonathepianist

    jonathepiani

    31 Temmuz 2008