dotfiles/.bin/osmc
2024-12-22 22:44:47 +01:00

19 lines
847 B
Bash
Executable File

#!/bin/sh
case $1 in
put) shift; rsync -rv --progress --append-verify $@ osmc:/media/USBDisk/ ;;
df) shift; ssh osmc "df -h /media/USBDisk/" ;;
ls) shift; ssh osmc "cd /media/USBDisk/ && ls $@ | grep -v lost+found" ;;
lls) shift; ssh osmc "cd /media/USBDisk/ && ls -lh | grep -v lost+found" ;;
del) shift; ssh osmc "cd /media/USBDisk/ && rm -v $@" ;;
ren) shift; ssh osmc "cd /media/USBDisk/ && mv \"$1\" \"$2\"" ;;
*) echo "usage: osmc <command> <args>"
echo " df - show disk space allocation"
echo " ls - list files"
echo " lls - list files with details"
echo " put <files> - copy files to USBDisk"
echo " ren <old> <new> - rename file"
echo " del <files> - delete file"
;;
esac