0

How can I move 100 random files from one directory to another in the Mac terminal? I would use shuf in linux.

yalpsid eman
  • 3,064
  • 6
  • 45
  • 71

1 Answers1

1

Based on glenn's commend, here's the answer (this would move 100 random files in the current directory):

shuf -zen100 * | xargs -0 -J % mv % /New_Dir/
yalpsid eman
  • 3,064
  • 6
  • 45
  • 71