锘??xml version="1.0" encoding="utf-8" standalone="yes"?>污网站在线免费看,欧产日产国产精品视频,a天堂中文在线官网在线http://www.aygfsteel.com/dedian/category/16533.html-- 鍏蟲敞鎼滅儲寮曟搸鐨勫紑鍙?/description>zh-cnTue, 27 Feb 2007 10:16:06 GMTTue, 27 Feb 2007 10:16:06 GMT60what comparison function is in linux sorting ?http://www.aygfsteel.com/dedian/archive/2007/02/02/97399.htmlDedianDedianThu, 01 Feb 2007 23:10:00 GMThttp://www.aygfsteel.com/dedian/archive/2007/02/02/97399.htmlhttp://www.aygfsteel.com/dedian/comments/97399.htmlhttp://www.aygfsteel.com/dedian/archive/2007/02/02/97399.html#Feedback0http://www.aygfsteel.com/dedian/comments/commentRss/97399.htmlhttp://www.aygfsteel.com/dedian/services/trackbacks/97399.html
...
abca.com
abc-d.com
abce.com
...

I am curious what comparison function it applys in its' sorting function. I supposed it should be a string comparison, like strcmp function, but it is not. coz strcmp will compare ascii code of characters in string one by one, thus above sorting should like this:

abc-d.com
abca.com
abce.com

one guess is that when sorting names the special characters like "." "-" will be skipped. but still got some problem when sorting following names:

abc---d.com
abc--d.com
abc-d.com

why can linux sorting keep this order? if it skips some special characters, above names should be compared equally and maybe sorted as a random order.

confused, anybody has thought about that?

-----
p.s.

Haven't got updated here for quite a long time, coz I am back to program with c under linux and I believe it is a place for Java programmers.

-----

update:

Linux sorting compares unicode of strings 鈥?more about unicode is here






Dedian 2007-02-02 07:10 鍙戣〃璇勮
]]>
How to search a file in Linuxhttp://www.aygfsteel.com/dedian/archive/2006/04/19/41789.htmlDedianDedianTue, 18 Apr 2006 18:04:00 GMThttp://www.aygfsteel.com/dedian/archive/2006/04/19/41789.htmlhttp://www.aygfsteel.com/dedian/comments/41789.htmlhttp://www.aygfsteel.com/dedian/archive/2006/04/19/41789.html#Feedback0http://www.aygfsteel.com/dedian/comments/commentRss/41789.htmlhttp://www.aygfsteel.com/dedian/services/trackbacks/41789.htmlWell, I just want to know how to do file searching in Linux as something like dir <file_name> /s in聽DOS...
by聽google, i found two methods:
ls -R | grep file_name
or
find . -name file_name
^-^


Dedian 2006-04-19 02:04 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 通化县| 运城市| 得荣县| 东台市| 江北区| 南木林县| 辛集市| 上饶县| 七台河市| 公主岭市| 北安市| 玛曲县| 宁强县| 新和县| 上高县| 麻阳| 依兰县| 富民县| 高雄市| 资兴市| 永年县| 彭泽县| 九寨沟县| 盖州市| 安阳市| 万源市| 库车县| 安泽县| 集安市| 永济市| 太原市| 保德县| 拉孜县| 巴塘县| 古丈县| 延津县| 岢岚县| 咸阳市| 吉水县| 石家庄市| 田林县|