Skip to main content

Misc study note

Useful miscellaneous notes for future reference.

sftp batch command continue on error

sftp will abort if any of the following commands fail:

get, put, reget, reput, rename, ln, rm, mkdir, chdir, ls, lchdir, chmod, 
chown, chgrp, lpwd, df, symlink, and lmkdir.

Termination on error can be suppressed on a command by command basis by prefixing the command with a - character

for example,

( -rm /tmp/blah*).