From d84c72c20b407c8e2a5a3a64d779518d2b614f37 Mon Sep 17 00:00:00 2001 From: pdiogoantunes Date: Tue, 26 Sep 2017 09:59:50 +0200 Subject: [PATCH] Liste process il y a moins de --- TipsShell.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TipsShell.md b/TipsShell.md index a6c3c8e8..0a22dd31 100644 --- a/TipsShell.md +++ b/TipsShell.md @@ -331,6 +331,12 @@ il n'y a que 2 différences : le «pseudo», et le «pass». $ ps -e -o etimes=,pid,cmd | sort -rn | awk '{if ($1!=0 && $3!~/\[.*\]/) print $0 }' ~~~ +### il y a moins de X minutes + +~~~{.bash} +$ MIN=5; ps -e -o etimes=,pid,cmd | sort -rn | awk '{if ($1<'$(( MIN * 60 ))' && $1>0 && $3!~/\[.*\]/) print $0 }' +~~~ + ### Watch Toutes les 5 secondes :