(02-05-2015, 08:17 AM)xoft Wrote: I don't want to copy it using scp, that means a needless extra transfer. A local copy on the remote machine should be much better.
This makes the per-month folders.Code:targetFolderFormat=$(date +"%Y-%m")
then
Code:
ssh -i $remoteKeyFile -p $remotePort $remoteUser@$remoteHost "cp $remotePath/$targetFolderFormat/$packedFileName $remotePath/latest.7z"