From: Nicolas Boisselier Date: Mon, 8 Jun 2015 15:59:54 +0000 (+0100) Subject: find-sort-mtime X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=ca1172ca3947f8093fdc8b381ffd033c4f17aa49;p=nb.git find-sort-mtime --- diff --git a/etc/bashrc.function b/etc/bashrc.function index 5324d383..30eed1e8 100644 --- a/etc/bashrc.function +++ b/etc/bashrc.function @@ -241,7 +241,7 @@ ls-tree() { find-sort-mtime() { ( case "$OSTYPE" in - darwin*) find $@ -type f -exec stat -f '%m %N' {} \; ;; + darwin*) find $@ -type f -exec stat -f '%m'$'\t''%N' {} \; ;; *) find $@ -type f -printf "%T@\t%p\n" | sed 's/^\([0-9]\+\)\.0\+/\1/' ;; esac ) | sort -k1 -n | cut -f 2 | head