Quantcast
Channel: Sort files according to the name containing numeric values - Ask Ubuntu
Browsing latest articles
Browse All 4 View Live

Answer by mondotofu for Sort files according to the name containing numeric...

Have you considered simplyls -v -1This can also be employed naturally with a file specification such as:ls -v -1 ABCD*orls -v -1 A*.csv

View Article



Answer by steeldriver for Sort files according to the name containing numeric...

If you switch to zsh, you can use its numeric glob qualifier: n sets the NUMERIC_GLOB_SORT option for the current pattern(see Glob Qualifiers under the FILENAME GENERATION section of man zshexpn).Ex. %...

View Article

Answer by cocomac for Sort files according to the name containing numeric values

First, don't parse the output of ls. We can modify the answer to a different question a bit to make it non-recursive, and then find ./ -maxdepth 1 -printf "%f\n", and you want it sorted, so pipe it...

View Article

Sort files according to the name containing numeric values

I have files in my system like this --rw-r--r-- 1 abc abcadm 14852497 Jul 23 01:11 ABCD_72_3_20210722_163502.csv-rw-r--r-- 1 abc abcadm 14853145 Jul 23 01:11 ABCD_72_1_20210722_163502.csv-rw-r--r-- 1...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images