From bff1927e3bdfffe98e75afe2db34b5c7e2e4edf3 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Wed, 9 Nov 2011 21:46:00 +0100 Subject: [PATCH] zshrc: alias lsnewdir/lsolddir shows newest/oldest created 20 directories (10 .dirs) --- doc/grmlzshrc.t2t | 6 ++++++ etc/zsh/zshrc | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/doc/grmlzshrc.t2t b/doc/grmlzshrc.t2t index 05a0275..f900a43 100644 --- a/doc/grmlzshrc.t2t +++ b/doc/grmlzshrc.t2t @@ -1208,9 +1208,15 @@ Lists symbolic links in current directory. : **lsnew** (//ls -rl *(D.om[1,10])//) Displays the ten newest files (long output format). +: **lsnewdir** (//ls -rthdl *(/om[1,10]) .*(D/om[1,10])//) +Displays the ten newest directories and ten newest .directories. + : **lsold** (//ls -rtlh *(D.om[1,10])//) Displays the ten oldest files (long output format). +: **lsolddir** (//ls -rthdl *(/Om[1,10]) .*(D/Om[1,10])//) +Displays the ten oldest directories and ten oldest .directories. + : **lss** (//ls -l *(s,S,t)//) Lists files in current directory that have the setuid, setgid or sticky bit set. diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 6add6f2..79dbc84 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2554,6 +2554,10 @@ alias lsnew="ls -rtlh *(D.om[1,10])" # display the newest files alias lsold="ls -rtlh *(D.Om[1,10])" # display the oldest files #a2# Display the ten smallest files alias lssmall="ls -Srl *(.oL[1,10])" # display the smallest files +#a2# Display the ten newest directories and ten newest .directories +alias lsnewdir="ls -rthdl *(/om[1,10]) .*(D/om[1,10])" +#a2# Display the ten oldest directories and ten oldest .directories +alias lsolddir="ls -rthdl *(/Om[1,10]) .*(D/Om[1,10])" # chmod #a2# Execute \kbd{chmod 600} -- 2.1.4