So today, I wanted to move all files to another file except one, I found that I can use MC (midnight commander)
I also learned that ssh password is the password of user
In terminal type "mc" to use the commander
Establishing SSH on Raspberry Pi
Create Password for Apache2
1_: create user with password in htpswd
2_: add directory to 000-default.conf
3_:
I made a stupid mistake again, instead of typing "etc" I typed "ect".
WORKING WITH CRON
see cron that was executed:
grep 'CRON.*(pi)' /var/log/syslog
Setting cron to turn on and off light with RFoutlet
00 7 * * * cd /var/www/html && ./codesend ____ -l 180 -p 0
40 23 * * * cd /var/www/html && ./codesend ____ -l 180 -p 0
sudo service cron reload -- use this after change crontab
Yesterday, when I logged in again, crontab was saved in tmp folder to keep conflicting with other task
Cron has this form
minute hour
TASK MANAGER FOR LINUX
sudo apt-get install htop
Use adb root mount -o rw,remount /system -> Use this to mount system on androidadb mount
1. Pull hosts file from android device by: adb pull hosts
2. Remount /system as above
3. Move your file to storage or sdcard (mine is /storage/emulated/0/)
4. adb shell su (mv <source> <destination>)
Make a batch file to change hosts
https://ss64.com/nt/
Make sure you have platform tool for Android to use adb. Then, open notepad and copy this code, save as .bat file and run.
cls
ECHO Change hosts file for Android devices
adb root mount -o rw,remount /system
adb pull /system/etc/hosts
start /W notepad "hosts"
adb push hosts /storage/emulated/0/
adb root shell mv /storage/emulated/0/hosts /system/etc/hosts
ECHO DONE!
PAUSE
cls
ECHO Change hosts file for Android devices
adb root mount -o rw,remount /system
adb pull /system/etc/hosts
start /W notepad "hosts"
adb push hosts /storage/emulated/0/
adb root shell mv /storage/emulated/0/hosts /system/etc/hosts
ECHO DONE!
PAUSE
PHP CGI
POST
CURL
post to website
curl -x post -d <'var=value'> <your address>
($_GET['n']=="1" && $_GET['s']=="on")
TASKER:
html get: <name>:<password>@host
STANDARD USB CAMERA
1. Use fswebcam
2.
USING RSYNC
https://help.resilio.com/hc/en-us/articles/206178924
INSTALLING SAMBA TO SHARE FOLDER (success)
http://raspberrywebserver.com/serveradmin/share-your-raspberry-pis-files-and-folders-across-a-network.html
http://raspberrypihq.com/how-to-share-a-folder-with-a-windows-computer-from-a-raspberry-pi/
https://help.lafayette.edu/samba/win7nondomain
![]() |
For win10 |
IMPLEMENT C WITH PHP
ASKING PASSWORD WHEN TYPE SUDO
Exit SSH
press Ctrl+D