How can I sort ls -l /dev by type and major and minor device number?
Posted
by Dennis Williamson
on Server Fault
See other posts from Server Fault
or by Dennis Williamson
Published on 2010-02-16T02:03:57Z
Indexed on
2010/03/22
3:01 UTC
Read the original article
Hit count: 354
How can I sort the /dev
directory by type and major and minor device number when doing ls -l
?
The best way I've found so far is:
ls -l /dev | sort -k 1.1,1.2 -k 5n -k 6n | less
Is there a better way?
© Server Fault or respective owner