I'm managing 2 linux servers and looking to copy the data from one to the other. I'm looking to just copy these files on one server first then zip it and then scp it over.

I need to copy a 100GB folder, but there are many subfolders in this folder. And in these folders that are some files that are 5MB+. How can I make a copy of this folder without including any of the files that are over 5MB+ in linux?

1 Answer 1


As always there is not nly one way to do this. My first thougth was to create a shellscript using find to create a filelist and den using rsync, scp or whatever to copy the files.. However, why do it complicated to achive a simple task?

Actually, i dove into the man page of rsync and found the --max-size=SIZE and the --min-size=SIZE arguments.. Use these to construct a rsync command, i'd suggest doing rsync over SSH. it could look something like this:

rsync -za --max-size=SIZE  /{SOURCE_FOLDER} user@destination.tld:/{DESTINATION_FOLDER}/

look in the man page for more options.. Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.