Posts Tagged shell scripting

Auto Backup using Dropbox in Linux/Mac

I had some folders on my disk which I wanted to keep a copy online as a backup and for viewing from other places. Its not always possible to save all the essentials in the drop box folder itself to be auto backed up. Thus I wrote a very small script which does this for me. All it does is read all the folders which needs to be backed up from the text file “dropboxFolders.txt” and copy them to dropbox folder. The rest is done by dropbox scripts. Hence I expect the dropbox program to be running always in the background. So here is the script:

Continue reading “Auto Backup using Dropbox in Linux/Mac” »


, ,

No Comments

How to Save file in vi not opened with sudo

It has happened to me a lot of times that i edit a file in vi. I insert and edit a lot and finally when I try to save it I find that I dont have permission for it. If only I had opened it with sudo. I found a solution for this issue. It was actually a simple command and here it is

Continue reading “How to Save file in vi not opened with sudo” »


, , , ,

3 Comments

Auto Away Notifier for Pidgin in Perl

Whenever I am away from laptop my chat buddies leave me lots message and finally lots of “You there???”. So I thought of making a script that would inform my buddies that I am away when someone sends me a message.
This method works with Pigin API.
I have used /proc/acpi/button/lid/C267/state file to find if the lib of the laptop is closed or not. This file may vary in your laptop. So try to find the find the file in your computer that stores the status of the lid. It should be a file in /proc/acpi/button/lid/ folder and replace the file accordingly in your computer.
The Content of /proc/acpi/button/lid/C267/state is state: open and state: closed when the lid was closed.

Continue reading “Auto Away Notifier for Pidgin in Perl” »


, , , , , , , , , , ,

4 Comments

BSNL Dataone Auto Downloader

Bsnl(India) provides an account that has 2am to 8am unlimited download. It was not easy to wake up at 2am and switch on the computer and sleep again. So I tried to find a method to switch on the computer automatically at 2am and download and shutdown at 8am. Although the I thought the idea was foolish, I found out that there actually is a method for doing it. “ACPI Alarm” was introduced in 1999 or so (Even my old PC had it).

Continue reading “BSNL Dataone Auto Downloader” »


, , , , , , , , ,

6 Comments

Script for Auto Copying of Cds/Dvds

Here is a script that i created for automatically copying all the files in cd to a folder and ejecting and waiting for the next cd.
So here is how it works.
You need to change the folder names and paths accordingly. And the shell script as

Continue reading “Script for Auto Copying of Cds/Dvds” »


, , , , , , , ,

No Comments

Copy in Linux with Ui

The program here is an UI for cp command. I have used cp in the background but over that I am just monitoring the files copied and speed of copying.
It’s not a perfected program. It’s quick one but works fine.
Execution:
Create a file named copy and insert the following code and give execute permission

Continue reading “Copy in Linux with Ui” »


, , , ,

1 Comment

Automatic Desktop Wallpaper Changer for Linux

I have a lot of wallpaper that I wanted to switch automatically. After a lot of search i found that there a command way to control all the gnome settings. So I the command I used is “gconftool-2“.
So code is like:

Continue reading “Automatic Desktop Wallpaper Changer for Linux” »


, , , , , , , ,

4 Comments

Birthday Reminder For Gnome Panel

This program checks the file /home/rsrijith/shell/birthday_reminder.txt to find the upcoming birthdays in 20 days and writes into the file /home/rsrijith/shell/birthdays.
There is a file called /home/rsrijith/shell/birthdays1, the difference between it and birthdays file is that birthdays contains only first name of the person and birthdays1 contains the whole name.
So that’s it. Now the code….

Continue reading “Birthday Reminder For Gnome Panel” »


, , , , , , , , , ,

7 Comments

Reminder for Gnome Panel

This is the program that lets us to enter the text and time at which it should be reminded me. The command has the following options
Continue reading “Reminder for Gnome Panel” »


, , , , , , , , ,

1 Comment