e. g. for rclone config update on headless machine
In /etc/ssh/sshd_config set AllowTcpForwarding yes
systemctl restart sshd
ssh -L 53682:127.0.0.1:53682 user@host -p -4 -g -N
CMAKE_FLAGS='-DENABLE_THINLTO=' ./docker/packager/packager --cache ccache --package-type=deb --output-dir "./$(git rev-parse --show-cdup)/build_results" |
# Keep only one monthly datapoint generated from Storage Analyzer | |
## dry run to show remaining folders | |
find ./20*-* -maxdepth 0 -type d -regex './20[0-9][0-9]-[0-9][0-9]-12_00-00-[0-9][0-9]' -print | |
## perform cleanup | |
find ./20*-* -maxdepth 0 -type d ! -regex './20[0-9][0-9]-[0-9][0-9]-12_00-00-[0-9][0-9]' -exec rm -rfv {} + |
./adb -e shell | |
su - | |
tar --dereference --create /data/user/ 1> /sdcard/tmp/backup-data-$(date +%Y%m%d).tar 2> /sdcard/tmp/backup-data-$(date +%Y%m%d).err | |
./adb -e pull /sdcard/tmp/ "\\TARGET\Bliss OS" |
# pull data | |
./adb -e pull /sdcard/ "\\TARGET\YYYY-MM_WSA\sdcard" | |
# userdata backup | |
copy %LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\*.vhdx "\\TARGET\YYYYMMDD_WSA_%USERNAME%" |
## Delete persist.sys.usb.config from /data/property/persistent_properties (defaults to none and overrides build.prop) | |
adb pull /data/property/persistent_properties | |
# modify as needed | |
adb push persistent_properties /data/property/persistent_properties | |
adb shell | |
raphael:/ # chmod 600 /data/property/persistent_properties | |
## Add persist.sys.usb.config to build.prop | |
raphael:/ # mount /dev/block/bootdevice/by-name/system |
adb pull /data/media/ "\\TARGET\data\media" |
setfacl -R -m u:plex:rwx <directory> |
find "/media/pi/" -type f -name *.mp4 -size +3G -print0 | xargs -d '\n' -0 sh -c ' | |
for file do | |
echo "$file" | |
destination="'"../large"'" | |
mkdir -p "$destination/${file%/*}" | |
mv -v "$file" "$destination/$file" | |
done' |
find . -type f -name *.mp4 -size -10M -print0 | xargs -d '\n' -0 sh -c ' | |
for file do | |
echo "$file" | |
duration=`/volume1/@appstore/ffmpeg/bin/ffprobe -i "$file" -show_entries format=duration -v quiet -of csv="p=0"` | |
echo $duration | |
if [ "${duration%.*}" -lt 10 ]; then | |
echo "Lower than threshold" | |
rm -v "$file" | |
fi | |
done' |