From 519dc1b9ce787759e14cd7c51ce03492bd2f7587 Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Thu, 8 Aug 2019 14:35:18 +0200 Subject: [PATCH] finding big files (not nemo) --- dot_zsh_aliases | 1 + dot_zsh_functions | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/dot_zsh_aliases b/dot_zsh_aliases index f4b5af5..436085f 100644 --- a/dot_zsh_aliases +++ b/dot_zsh_aliases @@ -68,6 +68,7 @@ alias x='extract' alias current_year='`echo date +"%Y"`' alias meteo='weather' alias learnmore="apropos . | sort --random-sort | awk 'NR == 1 {print$1}' | cut -d'(' -f 1 | xargs man" +alias biggerthan10='biggerthan 10M' # Show/hide hidden files in Finder alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" diff --git a/dot_zsh_functions b/dot_zsh_functions index a62702a..8369dc2 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -101,3 +101,8 @@ function skip { n=$(($1 + 1)) cut -d' ' -f$n- } + +# Find files bigger than X size and sort them by size +function biggerthan() { + find . -size "+$*" -type f -print0 | xargs -0 ls -Ssh | sort -z +}