sudo apt install unzipunzip file.zip -d destination_folder
sudo apt install unzipunzip file.zip -d destination_folderdiff -rq /.../folder1 /.../folder2The r flag assures that each directory is recursively looked at.
The q flag activates the brief mode: without this flag, diff will tell us the actual line-by-line differences for any files that exist in both locations but are not identical.
To check differences between remote shares:
diff -rq /Volumes/Movies-1 /Volumes/Movies-2This also works with rsync:
rsync -avun $SOURCE $TARGETIn case you want to avoid corrupt files, you want to check for checksums too:
rsync -avnc $SOURCE $TARGETsudo apt-get install samba -yOnce the software is installed, you’re ready to configure your first share. Open the samba configuration file:
Your Samba shares will be configured in /etc/samba/smb.conf, so open that file with the command:
sudo nano /etc/samba/smb.confScroll to the bottom and add the following for each share:
[ShareName]
path = /var/www/www.website.com
valid users = paul
browsable = yes
writable = yes
read only = noSave (CTRL-O) and close (CTRL-X) the configuration file.
Restart the Samba daemon:
sudo systemctl restart smbdAfter limiting access to a list of users (see above), you have to add the user to Samba and create a password for him/her.
sudo smbpasswd -a paulYou will be prompted to enter the password and confirm it for user paul. After creating the user, you have to enable him/her.
sudo smbpasswd -e paulsudo smbpasswd -d paulsudo smbpasswd -x paulsudo apt update
sudo apt upgradesCheck the version you are running:
lsb_release -aIf updater is not installed:
sudo apt install update-manager-coreTo upgrade the release:
sudo do-release-upgrade -dLive show openHAB logfile
tail -f /var/log/openhab/openhab.logBackup openHAB. The backup file will be created at /var/lib/openhab/backups.
openhab-cli backupRestore openHAB backup file
sudo systemctl stop openhab
openhab-cli restore /var/lib/openhab/backups/openhab-backup-23_03_26-19_38_25.zip
sudo systemctl start openhabInstall bindings manually to the following directory. They will be automatically enabled.
cd /usr/share/openhab/addonsTo redirect all traffic from non secure to secure sockets layer (SSL), add the following lines to the virtual host config file in /etc/nginx/sites-available/my_vhost_config_file.
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}Listen 80: This instructs the system to catch all HTTP traffic on Port 80
Server_name _; : This will match any hostname
Return 301: This tells the browser (and search engines) that this is a permanent redirect
https://$host$request_uri: This is a short code to specify the HTTPS version of whatever the user has typed
scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/filescp /path/to/local/file username@hostname:/path/to/remote/filescp username@hostname:/path/to/remote/file /path/to/local/file