[lubuntu-users] PCManFM hidden files/dirs

Aere Greenway Aere at Dvorak-Keyboards.com
Thu Jun 23 16:36:03 UTC 2016


Jerry:

The practice of having directories (folders) together at the beginning 
of the list is something that has been done in the past, and people have 
gotten used to.  The idea with it, is that you can see quickly (in 
browsing down to lower levels) all of the directories available in a 
particular directory, without having to scroll down into the list.

Personally, I like it that way, but that is just my personal preference.

That practice is not always followed nowadays.  In other 'flavors' of 
Ubuntu, such as Ubuntu Gnome, directories (folders) are sorted along 
with the filenames, in alphabetic order.  SUSE linux does it that way as 
well.

In sorting the filenames and directory (folder) names, the character 
string of the name is compared lexically (a character at a time), and 
using that comparison, the names are sorted into an ordered list of names.

Where the directory names all come first, a separate list of directory 
names is sorted, then a list of the filenames is sorted, which is shown 
after the list of directory names.

To have them appear together, all that is needed is to sort a single 
list of files AND directories.

Programming languages have library routines for comparing two strings of 
characters, character by character.

Those routines use the underlying character set in doing those comparison.

For example, here is a table showing the (hexadecimal) numeric values of 
the ASCII character set:

*7*

	

*6*

	

*5*

	

*4*

	

*3*

	

*2*

	

*1*

	

*0*

	


*p*

	

*`*

	

*P*

	

*@*

	

*0*

	


	

/*DLE*/

	

/*NUL*/

	

*0*

*q*

	

*a*

	

*Q*

	

*A*

	

*1*

	

*!*

	

/*DC1*/

	

/*SOH*/

	

*1*

*r*

	

*b*

	

*R*

	

*B*

	

*2*

	

“

	

/*DC2*/

	

/*STX*/

	

*2*

*s*

	

*c*

	

*S*

	

*C*

	

*3*

	

*#*

	

/*DC3*/

	

/*ETX*/

	

*3*

*t*

	

*d*

	

*T*

	

*D*

	

*4*

	

*$*

	

/*DC4*/

	

/*EOT*/

	

*4*

*u*

	

*e*

	

*U*

	

*E*

	

*5*

	

*%*

	

/*NAK*/

	

/*ENQ*/

	

*5*

*v*

	

*f*

	

*V*

	

*F*

	

*6*

	

*&*

	

/*SYN*/

	

/*ACK*/

	

*6*

*w*

	

*g*

	

*W*

	

*G*

	

*7*

	

‘

	

/*ETB*/

	

/*BEL*/

	

*7*

*x*

	

*h*

	

*X*

	

*H*

	

*8*

	

*(*

	

/*CAN*/

	

/*BS*/

	

*8*

*y*

	

*i*

	

*Y*

	

*I*

	

*9*

	

*)*

	

/*EM*/

	

/*HT*/

	

*9*

*z*

	

*j*

	

*Z*

	

*J*

	

*:*

	

***

	

/*SUB*/

	

/*LF*/

	

*A*

*{*

	

*k*

	

*[*

	

*K*

	

*;*

	

*+*

	

/*ESC*/

	

/*VT*/

	

*B*

*|*

	

*l*

	

*\*

	

*L*

	

*<*

	

*,*

	

/*FS*/

	

/*FF*/

	

*C*

*}*

	

*m*

	

*]*

	

*M*

	

*=*

	

*-*

	

/*GS*/

	

/*CR*/

	

*D*

*~*

	

*n*

	

*^*

	

*N*

	

*>*

	

*.*

	

/*RS*/

	

/*SO*/

	

*E*

/*DEL*/

	

*o*

	

*_*

	

*O*

	

*?*

	

*/*

	

/*US*/

	

/*SI*/

	

*F*

Values in the table toward the top and right, come before values to the 
bottom and left.

The values in this table are expressed as hexadecimal numbers. The top 
heading (shaded) is the left (most significant) digit, and the right 
heading (shaded) is the right (least significant) digit.

So a period (dot = .) yields a hexadecimal value of 0x2E, which is less 
than even the lowest digit "0", which is a 0x30, and certainly less than 
the first letter, "A", which is a 0x41. Notice that the lower-case 
letters are all greater than the upper-case characters.  An "a" is a 
0x61.  Sometimes software does a case-insensitive sorting, so the upper 
and lower case variants of a name appear together.

Nowadays, Unicode is used, which (I think) has some 
backward-compatibility with ASCII.  Also, European languages have 
characters not included in ASCII, which are every bit as important as 
the ASCII characters.  If you look in the characters available in fonts, 
those additional characters tend to appear toward the higher end of the 
table, and have greater numeric values.

Anyway, hidden files, which on Linux begin with a period (dot = .), come 
before any filenames beginning with an alphabetic or numeric character 
(which normally appear first in a filename).  So they appear first in 
sorted lists.

In my own usage, I only have the hidden files displayed when I am 
looking for them ("Show Hidden" checked), so the many hidden files or 
directories do not usually appear.

Having said all that, in every case I know of, it is possible (in 
programming languages) to substitute your own routine for doing lexical 
comparisons of character strings, or to override the standard lexical 
comparison routine.

By doing so, you are doing a thing differently from how they are usually 
done (sometimes dictated by standards).

But if there are enough people who prefer it a different way, or if 
there is a competing standard, it could (and possibly should) be done.

I hope this helps explain underlying reasons.  I have no special insight 
in the decisions made where some Ubuntu 'flavors' (and openSUSE) sort 
directories along with files, rather than at the beginning.

- Aere

On 06/23/2016 09:40 AM, J. Van Brimmer wrote:
> Hello folks,
>
> I am trying, really I am, to like Lubuntu and to stick with it. But one thing really bugs me, the way PCManFM sorts files. Can somebody please explain to me the logic of sorting hidden files and directories *before* normal files/dirs?
>
> For example, take a look at this image:
> https://www.dropbox.com/s/6ono67mx0svaljp/2016-06-23-080918_997x784_scrot.png?dl=0
>
>     
> Why are hidden files sorted *before* normal files? It just feels wrong to me, but if there's a good, logical reason for it, maybe I could get used to it, if I see the advantage to it.
>
> Cheers,
>
>
>   
> ---Jerry
>


-- 
Sincerely,
Aere

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/lubuntu-users/attachments/20160623/fc611142/attachment-0001.html>


More information about the Lubuntu-users mailing list