I'm facing this simple task but, I'm also wondering about what's the easiest and short way to do it.

My proposal is move a given number of random files from a directory to another. This task is part of the creation of two datasets I need for machine learning: a training set and a testing set. My goal is move away 10% of the file from a directory in order to get the dataset against which I could test my categorizer, and obtain a training set from the source directory.

So, what's the most compact typing for this "move n random files" task?

Edit
Report