liviu.vasut

Authored Comments

Hi Rikard,

I also don't stream a lot, mainly because it drains the battery faster.

Here is my version as a bash script:

# config part
procFilesCopy=50;
from=/path/to/my/music/collection;
to=/path/to/phone/mount;

# execution part
fileCount=$(ls $from | wc -l);
copyCount=$(($fileCount * $procFilesCopy / 100));
ls $from | shuf -n $copyCount | while read f; do cp $from/$f $to; done