How do I move 100 files from one directory to another in Linux?

Mỹ An

New member
How do I move 100 files from one directory to another in Linux?
Answer
  1. ls -rt source/* – command lists all the files with the relative path.
  2. head -n100 – takes first 100 files.
  3. xargs cp -t destination – moves these files into the destination folder.
 

Tìm kiếm

Back
Top