Move specific number of files mac/unix terminal

By | December 10, 2017

Move specific number of files mac/unix terminal

In order to move specific number of files from one directory to another on mac, use the following command in mac terminal. This command is very useful in data science for segregating the data for training and testing purpose.

Credit for this post goes to @hardikthaker. Thanks to him !

Instead of -n, write number of files to be moved. For example, -10 will move 10 files to the path you specified at the end.