From 0a907c797d5425c8324d86b9cd653f977321e661 Mon Sep 17 00:00:00 2001 From: btatu Date: Fri, 26 Aug 2022 17:21:52 +0200 Subject: [PATCH] Astuce -newermt --- TipsShell.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TipsShell.md b/TipsShell.md index 77b36794..610a9517 100644 --- a/TipsShell.md +++ b/TipsShell.md @@ -178,11 +178,17 @@ $ grep -F -x -v -f ### Supprimer des vieux fichiers - - Par exemple, si + vieux de 30 jours en modification : + - Si + vieux de 30 jours en modification : ~~~{.bash} $ find DIR/ -type f -mtime +30 -delete $ find DIR/ -type f -mtime +30 -exec rm '{}' \; +~~~ + + - Si + vieux depuis le 24 aout 2022 à 11h : + +~~~{.bash} +$ find DIR/ -type f -newermt “2022-08-24 11:00:00.00 -delete ~~~ ### Comparer deux fichiers à travers SSH