From d848bb04401638b99df8c9205e7a8ba979b7214d Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 4 Feb 2023 17:51:13 +0100 Subject: [PATCH] largefiles remove stderr --- home/.zsh-server/zshrc | 2 +- home/.zsh/zshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/home/.zsh-server/zshrc b/home/.zsh-server/zshrc index 2e3ae73..29920ea 100644 --- a/home/.zsh-server/zshrc +++ b/home/.zsh-server/zshrc @@ -16,7 +16,7 @@ alias lgrep="find | grep" alias psgrep="ps axu | grep" alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"' ### Functions -function largefiles () { du -h "$@" | grep -P "\d+\.\d+(G|T)"; } +function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } ### ZSH HOME export ZSH=$HOME/.zsh-server diff --git a/home/.zsh/zshrc b/home/.zsh/zshrc index 2d7db07..301f722 100644 --- a/home/.zsh/zshrc +++ b/home/.zsh/zshrc @@ -26,7 +26,7 @@ alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"' alias vim="vimx" ### Functions -function largefiles () { du -h "$@" | grep -P "\d+\.\d+(G|T)"; } +function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" } ### ZSH HOME export ZSH=$HOME/.zsh