Tagged Questions
3
votes
2answers
646 views
How to physically reorder files `03.mp3 01.mp3 02.mp3` (`ls -f`) in a directory?
The physical order of the files matters when I copy them onto my USB stick and listen in car mp3 player. Most of my music album folders are unsorted, e.g. ls -f may produce:
03.song3.mp3
01.song1.mp3
...
3
votes
1answer
456 views
ls version number sorting Mac OS X
Is there an equivalent to ls -v in Mac OS X that will do version number sorting?
In Mac OS X, ls -v does NOT do version number sorting, but the Finder seems to.
2
votes
2answers
2k views
How to sort ls by column in Ubuntu via piping to sort?
I'm a Linux newbie trying to learn how piping works in the Ubuntu terminal. I tried to sort by file size:
ls -al | sort -k5
The files were listed in this order:
drwx------ 19 min10 domain users ...
20
votes
10answers
13k views
Unix: ls, how to sort first directories then files etc
I would like to use ls command to first show direcotries and then files. I tried
ls -la | sort -k 1
But I got a wrong order.