I have a large amount of files I need to copy to Box.com using DAV2fs. I've found I'm only able to copy a couple gigs at a time, and then I have to wait for a couple minutes while box catches up or it errors out.
So what I did was I made a list of all the files/directories using "find ./ > outfile.txt"
I want to iterate though the list of files, and after say 100 copies(or whatever) wait 10 minutes. How would I do that? without using cp -r, when the outfile.txt looks like:
/dirctory1
/directory1/file.txt
/directory1/file2.txt
cp omits the directory so file and file2 never get copied. If I do cp -r then it will do directory1 and all it's contents so my file count will be off.
EDIT:
To clarify, I'm interested in the cp portion. Specifically how to get cp to create a directory without doing -r as -r will throw off my count.
rsync
with its--bwlimit
option, to limit I/O bandwidth is worth a look, e.g.rsync -av --bwlimit=100 --progress /foo /bar
- more info at unix.stackexchange.com/questions/117680/…