I want to copy a number of files from a distant server to local computer, such that the total size of the files does not exceed certain limit, as I do not locally have enough disk space; and the files are interchangeable samples of a greater whole, i.e. it does not matter which individual files are downloaded and in which order, just that a number of such files is downloaded within the disk space limit.
The files are downloaded as normal, but the download stops once the size limit is breached and the currently processed file is discarded.
Does SCP have such capability? I know that RSYNC can limit file size, but that is for individual files, not for cumulative file size.
If SCP nor RSYNC cannot do that, is there any other way?