Category Archives: Bash

rsync: protocol version mismatch — is your shell clean?

Again and again (over years) I’m running in this error-message on my terminal. All the good pages in the web are telling me that I have an edited .bashrc. But that isn’t true. So now I write it down; for … Continue reading

Posted in Bash | Tagged , , | Leave a comment

Turn off Caps Lock Key in Linux

1$ setxkbmap -option ctrl:nocaps   You can add this to your ~/.bash_profile to make it constant. —.bash_profile— export PATH xmodmap -e “remove lock = Caps_Lock” —.bash_profile—   To reset caps lock. enter: 1$ setxkbmap -option  

Posted in Bash, Linux | Tagged | Leave a comment

Backup and restore

backup tar cvpzf /place/to/backup/user/backup-`date ‘+%Y%m%d’`.tar.gz /home/user –exclude=/home/user/.Trash restore tar xvpfz backup+++++date+++++.tgz -C /

Posted in Bash, Linux | Tagged | Leave a comment

Validate IP

#!/bin/bash # What a nice pice of shell-programing… thx to Chris F.A. Johnson @ comp.unix.shell is_ip() { case “$*” in “”|*[!0-9.]*|*[!0-9]) return 1 ;; esac local IFS=. set — $* [ $# -eq 4 ] && [ ${1:-666} -le 255 ] … Continue reading

Posted in Bash | Leave a comment