USB-монитор Mimo 2G и дешевый компьютер (Raspberry Pi?) [Закрыто]

Как вы упомянули в комментарии, вы хотите проверить файл текущей даты в удаленном каталоге, вы можете сделать это следующим образом:

FILE=$(ssh -q "$USER"@"$HOST" 'find /home/oracle/SABARISH/logs/sftp -type f -daystart -mtime -1 | wc -l')

if test "$FILE" -eq 0; then
        exit
else
        # do your SFTP stuff here
fi

from man find :

-daystart
    Measure times (for -amin, -atime, -cmin, -ctime, -mmin, and -mtime) from the beginning of today rather than from 24 hours ago. This option only affects tests which appear later on the command line.
2
10.05.2012, 02:42
0 ответов

Теги

Похожие вопросы