Solutionist's Blog

Tech | Health | Life | Travel

bash script : rsync only if device mounted

  The script checks if the location to backup the files to is a mountpoint. If not, the script should mount it or die. If it is a mountpoint, rsync should be run.   here goes   #!/bin/bash ## ## VARIABLES ## # Set source location BACKUP_FROM=”/srv/media/” # Set target location BACKUP_TO=”/media/backup/media/” BACKUP_DEV=”xxxxxxx-xxxxx-xxxxxxxxxxxxxxx” #UUID of […]

how to take screenshot in Mac OS x

Shortcuts Command-Shift-3: Take a screenshot of the screen, and save it as a file on the desktop Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a […]

html meta redirect to different site

However, when using this HTML redirect code, please ensure that you don’t use it to trick the Search Engines, as this could get your web site banned. It is always best to work hard and learn quality ways in which to drive traffic to your web site. Place the following HTML redirect code between the […]

changing root password mountion lion

Enable the root user Choose Apple menu > System Preferences, and then click Users & Groups. Click the lock icon to unlock it, and then type an administrator name and password. In the Network Account Server section, click Join or Edit. Click Open Directory Utility. Click the lock icon to unlock it, and then enter […]

change folder icon mac mountain lion

To change your Mac’s Finder folder icons, all you need to do is copy the new icon you wish to use, and paste it onto the old one. The process is simple, but it requires a few steps. To start, select an icon you want to use as your first new icon. Copying the New […]

how to show hidden files in mac OS-X mountain lion

   To Make every hidden files visible   , lauch terminal and run this defaults write com.apple.Finder AppleShowAllFiles YES Press return Now hold ‘alt’ on the keyboard and right click on the Finder icon Click on Relaunch reverse the operation by typing defaults write com.apple.Finder AppleShowAllFiles NO   make one particular folder visible If you […]

Preventing Open SSH from sending the LC_* variables

The fix is very easy. On your local system open your ssh_config file as root (usually in /etc/ssh_config or /etc/sshd/ssh_config) and comment this line: SendEnv LANG LC_* That’s it! From now on you will no longer get the annoying Bash error. Alternatively you can also set the locale setting of your locale system to something that matches […]

Secured By miniOrange