From f854e46511eded7f385f1afe3fa9b5673cf7c11e Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 14 Nov 2023 12:51:35 +0100 Subject: [PATCH] Deleted old scripts --- list_duplicates.sh | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100755 list_duplicates.sh diff --git a/list_duplicates.sh b/list_duplicates.sh deleted file mode 100755 index 94161ef..0000000 --- a/list_duplicates.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ] -then - echo "Directory path not provided" - exit 1 -fi - -dir="$1" -duplicates=$(find "$dir" -type f -exec md5sum {} + | sort | uniq -d -w32) - -if [ -z "$duplicates" ] -then - echo "No duplicates found." - exit 0 -fi - -echo "Duplicates found:" - -echo "$duplicates" | while read line -do - files=$(grep "$line" <<< "$duplicates" | awk '{print $2}') - file_type=$(file -b --mime-type "${files[0]}") - if [[ $file_type == text/* ]] - then - diff "${files[@]}" - else - echo "$files" - fi -done