Answer the question
In order to leave comments, you need to log in
How to log commands in linux?
Hello. I am interested in such a question. Can I somehow log the execution of a specific command in linux?
Those. I want the result of the command to be php -v
saved to a file, for example. I can do this: php -v > file.log
but I need to save not only the result of the execution, but also the date and time.
Can you please tell me how to implement this?
Thanks in advance to all who respond.
Answer the question
In order to leave comments, you need to log in
but I need to save not only the result of the execution, but also the date and time
Thu Oct 18 20:13:31 MSK 2018 v10.11.0
Thu Oct 18 20:13:32 MSK 2018 v10.11.0
Thu Oct 18 20:13:33 MSK 2018 v10.11.0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question