summaryrefslogtreecommitdiff
path: root/.local/bin/findcache
blob: 82e53ffd16797f18dcc462939304fadce11bbb03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

dirs="/home /mnt /media /etc /usr"

echo "$(date '+%a %m-%d-%Y %I:%M:%S %p') Creating findcache for the following..."
echo "$dirs"

notify-send "Now creating find cache..." "$dirs"

find ${dirs} -type d 2>/dev/null | sort > /tmp/dirs && mv /tmp/dirs "$HOME"/.cache/fcd/dirs &
find ${dirs} -type f 2>/dev/null | sort > /tmp/files && mv /tmp/files "$HOME"/.cache/fcd/files &