To sort the files in a directory, such as
file_2.txt
file_12.txt
file_43.txt
file_1.txt
ls command will get you, this
file_1.txt
file_12.txt
file_2.txt
file_43.txt
if you want the sorted list to look like
file_1.txt
file_2.txt
file_12.txt
file_43.txt
according to the numeric order, then you need to sort command
ls *.txt | sort -t_ -k2 -n
-t specifies the separator
-k specifies the field id
-n indicates numeric sorting
Subscribe to:
Post Comments (Atom)
RISC-v emulator
Changes are based on https://risc-v-getting-started-guide.readthedocs.io/en/latest/linux-qemu.html For Ubuntu/Debian, in addition to sud...
-
make menuconfig *** Must enable "hotplug2" module, otherwise kernel panic tftp 192.168.1.20 binary timeout 60 put openwrt-ar71x...
-
Busybox http://www.androidfanatic.com/community-forums.html?func=view&id=228&catid=9 Iperf http://www.magicandroidapps.com/wiki/...
-
/etc/rc.local # Put your custom commands here that should be executed once # the system init finished. By default this file does nothing. ...
No comments:
Post a Comment