Subject: touch a file remotely

touch a file remotely

From: Mark Roden <>
Date: Wed, 18 May 2011 07:59:16 -0700

Hi all,

I'm looking for the ability to touch a file on a remote server where
I'm logged in via scponly. I have sftp read/write access in the
directory I need to write things.

Right now, in order to touch a file on the remote system, I create it
locally, and then send it as a zero-length file. There's nothing
wrong with that, except that it just seems inefficient (and requires
local cleanup steps, making sure that everything goes into the right
place, etc). Is there a way to touch a file on a remote system through
a libssh2 function call?

Received on 2011-05-18