Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The question says it all. I want to copy files in the terminal, but there are a few big files I don't want to copy (because they are backups). Is there a command to do that?

Something like cp --max-size=200MB?

I know rsync has such an option. Is that the way to go?

share|improve this question
up vote 4 down vote accepted

Try using the find command to build a list of files under 200MB and copy them to a dir.

find . -size -200M -exec cp -r {} dir/ \;
share|improve this answer
Using -200 is a must, if you leave out the -, you won't get any results. the - indicates 'smaller than' – BenK May 27 '13 at 20:09

Here is how I do it with rsync:

rsync --max-size=200MB --progress --verbose --recursive --links --perms --delete --ignore-existing --executability --owner --group --times SOURCE TARGET

I would still like to accept an cp solution, though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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