PhD in Computer science, data scientist at Consid AB.
I’m gathering some useful commands that I’m using over SSH on my Synology NAS. Most are just for myself to remember what I’ve done but others might find them useful too.
This is the snippet I’m using for copying files to my NAS.
$ rsync -a \
--info=progress2 \
--rsync-path=/volume1/@appstore/synocli-net/bin/rsync \
--no-inc-recursive \
<src> <dest>
--remove-source-files
is useful if I want to move files (it removes files from source after completion).
find . -empty -type d -delete
find . -type f -size +4G
finds all files that are bigger than 4GB.
find . -iname \*.csv -size +30M -print0 | xargs -P 3 -n 4 -0 bzip2 -9
In general the command pv
is really useful here. This is quite specific against the status of Elodie.
C=0
while true; do
NEW=`jq ' . | length' /volume1/pictures/location.json `
if [ $NEW -gt $C ]; then
C=$NEW
echo -en "\r $NEW "
printf " %'d" `jq '.|length' /volume2/Media/tmp/hash.json `
fi
sleep 2
done