備份特定資料夾內所有大於 100mb 的 mp4 檔案

以前都沒想到可以用這招來備份檔案, 可能賢者時間覺得多打幾個字沒關係吧?

1
2
3
4
5
6
# list files
find /path/to/find -name '*.mp4' -type f -size +100M -exec ls -lh "{}" \;

# copy
find /path/to/find -name '*.mp4' -type f -size +100M -exec cp -v "{}" /path/to/copy_file \;

Reference:
stackoverflow: Copying all *.mp4 (for example) to somewhere
StackExchange: List files bigger than filesize specified
stackoverflow: Find and copy files