Auto writes data buffered in memory out to disk before logout

Advertisement

huangsijun17
Joined:
Posts:
3

Auto writes data buffered in memory out to disk before logout

I have some embedded devices connected via SFTP. I need to power off the device after copying files via WinSCP. However, powering off the device directly will result in some data loss, so I need to run the "sync" command to write the copied files to the disk. Can I automatically execute the command to write the files to the disk when WinSCP disconnects?
Last edited by huangsijun17 on 2025-09-26 02:50; edited 1 time in total

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
42,389
Location:
Prague, Czechia

Re: Auto writes data buffered in memory out to disk before logout

You mean to execute some proprietary sync command over the FTP protocol/connection?

Reply with quote

martin
Site Admin
martin avatar

That's even more confusing for me – as there are no textual commands in the SFTP protocol.
Perhaps you mean sync shell command?

Reply with quote

huangsijun17
Joined:
Posts:
3

martin wrote:

That's even more confusing for me – as there are no textual commands in the SFTP protocol.
Perhaps you mean sync shell command?
Correct. I copied the description from the sync man page directly to avoid confusion with rsync.

Reply with quote E-mail

Advertisement

You can post new topics in this forum