Tag Info

Hot answers tagged


The usual solution to this problem is to put your time command in a group: $ { time wc test >wc.out; } 2>time.out


There's no foolproof way to tell. However, for log files, the change time (as opposed to the modification time) which you see in the output of stat may be the time at which the compressed file was created, because the filesystem attributes of these compressed files are rarely modified after their creation. For .gz files which were not created by compressing ...


I have extended your script, so that you can run it once on startup and it will do it's job between 9PM and 9AM. #!/bin/bash -· LOGFILE="/tmp/autotest_run_count.txt" trap "echo manual abort; exit 1" 1 2 3 15 RUNS=0 while [ 1 ] ; do· HOUR="$(date +'%H')" if [ $HOUR -ge 21 -a $HOUR -lt 9 ] ; then # run program libreoffice || exit 1 ...

Only top voted, non community-wiki answers of a minimum length are eligible