dotfiles/.bin/osmc
2024-12-22 21:08:35 +01:00

19 lines
800 B
Bash
Executable File

#!/bin/sh
case $1 in
put) shift; rsync -rvP $@ osmc:/media/USBDisk/ ;;
df) ssh osmc "df -h /media/USBDisk/" ;;
ls) ssh osmc "cd /media/USBDisk/ && ls -1 | grep -v lost+found" ;;
lls) 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 <file> - copy files to USBDisk"
echo " ren <old> <new> - rename file"
echo " del <file> - delete file"
;;
esac