1
0
Derivar 0

examples/move_downloads.sh: Ignore size 0 files

Este cometimento está contido em:
Albert S. 2020-08-21 11:07:31 +02:00
ascendente 19e34c1904
cometimento 9925f12675
1 ficheiros modificados com 1 adições e 0 eliminações

Ver ficheiro

@ -4,6 +4,7 @@
#adhocify -d -m IN_CLOSE_WRITE -m IN_MOVED_TO -w /home/user/Downloads -w /home/user/other_dir /path/to/move_downloads.sh
INCOMING="$1"
stat -c"%s" "$INCOMING" | grep -q "^0$" && exit
#ignore partial downloads (.part in firefox, .crdownload in chrome)
echo "$INCOMING" | grep -q .part$ && exit
echo "$INCOMING" | grep -q .crdownload$ && exit