[cs631apue] sorting files containing a dot

mseaton mseaton at stevens.edu
Wed Sep 21 23:31:08 EDT 2016


Hello,
the standard ls sorts files stored in directories. My files that 
contains a . seems to "throw off" the sorting a bit. for example:

Here are a list of files from my /home/mseaton directory:

Desktop
Documents
Downloads
Music
NewFolder
Pictures
PrintBlocks.c
Public
SortFileSize.c
Templates
Videos
examples.desktop
file1
functions.h
headers.h
ls
ls.c
ls.c~
mozilla.pdf

As you can see, examples.desktop and a few others are out of place. Any 
suggestion for how to handle the files with the .? I was planning on 
removing the dots, sort the files and somehow put the dots back in its 
place, but this does not seem possible.

Marlon


More information about the cs631apue mailing list