Thursday, May 9, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 8157  / 1 Year ago, fri, april 28, 2023, 9:46:38

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?


More From » command-line

 Answers
2

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/ ;

[#31016] Saturday, April 29, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
initiallartebeest

Total Points: 24
Total Questions: 118
Total Answers: 105

Location: Venezuela
Member since Thu, Jul 15, 2021
3 Years ago
;