Hi I was wondering if anyone knew the best way to have files displayed by list so that they were in numerical order?
the problem I am having is I am using the ls and the head command to sort a group of 500 files into manageable 133 file bunches and transfer them to another directory were they will be processed by another program.
This is an example of the file name "OPS-order-326-item-PM447_Quantity_6_of_500_front.p1.p1.pdf"
All the files stay in order until the Quantity number changes from one digit to two, then the sort displays with Quantity_2 next to Quantity_200
"OPS-order-326-item-PM447_Quantity_2_of_500_front.p1.p1.pdf being next to
"OPS-order-326-item-PM447_Quantity_200_of_500_front.p1.p1.pdf
Is there a better way to do this outside of having leading zeros in my quantity number?
Below is the command that I am using
ls /somefiles/*.pdf | head -133 | xargs -I{} mv {} /A_place_to_put_somefiles