Quickly Moving Contents Around In Bash
Join the DZone community and get the full member experience.Join For Free
// This will move the top 250 files in one dir to directory of its own.
n=10; mkdir -p $n/music/release; for d in $(ls 1168914216_84387/music/release/| head -n 250); do mv 1168914216_84387/music/release/$d $n/music/release/; done
Bash (Unix shell)
Opinions expressed by DZone contributors are their own.