bash - stat command using sftp (mtime) -
i'm trying write bash script, automates finding reports being uploaded ftp site. want use mtime (stat -c %y <file>
) in if
statement test against static time parameter further processing. there analogous command while using sftp? 'stat ' doesn't work, nor 'sftp stat ', both returning 'invalid command'. thanks
with openssh sftp
, closest can
ls -l /remote/path/to/file
if have shell access, use ssh
instead:
ssh user@example.com stat /remote/path/to/file
Comments
Post a Comment