linux_NBcKTU
New Member
My question: I have a large amount of files on a disk and I have three different methods to move/copy them:
1. using find:
```
find /disk -xdev -type f -iname "*.pdf" -exec cp -ga "{}" /dest \:
```
2. using find print0 and grep -z:
```
find /disk -xdev type f -iname "*" -print0 > ./alllist.txt
```
and then grepping with
```
grep -z "<some regex="" for="" pdf="" files"="" .="" alllist.txt=""> ./copylist.txt
```
and then using that copylist for copying
3. using a single
```
rsync
```
expression which only copies pdf files into one! folder
Which one would you all suggest?? (less moving of the RW-Head and don't changing too much on disk structure). Another question is: what would be the rsync command for that?
1. using find:
```
find /disk -xdev -type f -iname "*.pdf" -exec cp -ga "{}" /dest \:
```
2. using find print0 and grep -z:
```
find /disk -xdev type f -iname "*" -print0 > ./alllist.txt
```
and then grepping with
```
grep -z "<some regex="" for="" pdf="" files"="" .="" alllist.txt=""> ./copylist.txt
```
and then using that copylist for copying
3. using a single
```
rsync
```
expression which only copies pdf files into one! folder
Which one would you all suggest?? (less moving of the RW-Head and don't changing too much on disk structure). Another question is: what would be the rsync command for that?