Skip to content

Instantly share code, notes, and snippets.

View xdbaqiao's full-sized avatar

xinjingye xdbaqiao

View GitHub Profile
@xdbaqiao
xdbaqiao / gist:4305916
Created December 16, 2012 09:48
RBtree
//红黑树, 二叉树改写而来
/***************************result************************
*
* 中序遍历红黑树:
* value=3 color=RED parent=7
* value=7 color=BLACK parent=10 left=3
* value=10 color=RED parent=14 left=7 right=12
* value=12 color=BLACK parent=10
* value=14 color=BLACK parent=17 left=10 right=16
* value=15 color=RED parent=16
当前目录文件从大到小排序:
ls -lS
当前目录,包含子目录文件从大到小排序
find ./ -type f -exec ls -s {} \; | sort -n -r
对当前目录下的子目录进行排序
du -b --max-depth=1 | sort -n -r