How To Exclude Certain Size Files From Copying In Linux

Exclude Certain Size Files From Copying In Linux

3 Responses

  1. Shaun says:

    $ rsync -rv –max-size=5m //wont transfer any file larger than 5mb
    $ rsync -rv –min-size=10m //will only transfer files smaller than 10mb

    Hmm don’t think this is quite right….

  2. jasimmk says:

    From rsync man page

    –max-size=SIZE
    This tells rsync to avoid transferring any file that is larger than the specified SIZE. The SIZE value can be suffixed with a string to indicate a size multiplier, and may be a frac‐
    tional value (e.g. “–max-size=1.5m

    –min-size=SIZE
    This tells rsync to avoid transferring any file that is smaller than the specified SIZE, which can help in not transferring small, junk files. See the –max-size option for a
    description of SIZE and other information.

  3. Kenneth says:

    Thx a lot. Saved a lot of time for me. Only added -size -10k to my find command for comfort 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.