Write current date/time and number of files to a file

Solution 1:

$ echo "$(date) $(ls -1 | wc -l)" >> /root/log.txt