Posts Tagged With: command

Encrypt/Decrypt files using GPG

Tagged with: , , , , ,

Encrypt/Decript files in linux


#Encypt...
gpg -c <Source File>

#Decrypt...
gpg <Encrypted File>
No Comments »

Send One Line From a Text File as as SMS Every 10 Mins

Tagged with: , , , ,

This command will send a line from a given text file one every 10 mins as an SMS to a given number.


i=1; while [ 1 ]; do sms INSERT_PHONE_NUMBER "$(cat "/home/binnyva/sms.txt"|head -n$i|tail -n1)"; sleep 10m; i=$(expr $i + 1); done

Script calls the command ‘sms’ – you can define that command however you want. In my case, its a variation of this script.

2 Comments »

Send Text Once Every 15 Mins

Tagged with: , , , , ,

Command to send a text to any phone once every 15 mins.


while [ 1 ]; do sms NUMBER_GOES_HERE "$(date '+%I:%M %p') Hey Anju. Still awake?"; sleep 15m; done

Script calls the command ‘sms’ – you can define that command however you want. In my case, its a variation of this script.

No Comments »

Generate Password

Tagged with: , , , , ,

Command to generate a random password…


openssl rand -base64 6
No Comments »

Watch for Ubuntu 9.10 Launch

Tagged with: , , , , , , ,

This script will run check for ubuntu launch once every 5 mins and let you know if there is an launch.


while [ 1 ]; do if [ -z "`curl -I "http://cdimage.ubuntu.com/releases/9.10/release/"|grep "404"`" ]; then kdialog --msgbox "9.10 Released"; exit; fi; sleep 300;  done
2 Comments »

Command to Find Current Ubuntu Version

Tagged with: , , , ,

Run this command to find the installed version of Ubuntu…


cat /etc/lsb-release
6 Comments »

top in Batch Mode

Tagged with: , , , , ,

Run top in batch mode


top -b -d 10 -n 3
No Comments »

Add Line Numbers

Tagged with: , , , , , ,

Use this command to add line numbers to a text file…


sed = filename.txt | sed 'N;s/\n/\t/' > filename_number.txt
3 Comments »

Install Package List

Tagged with: , , , , , ,

Install a list of packages from a text file.


cat packages.txt | xargs apt-get install
No Comments »

Rename Command

Tagged with: , , , ,

Different way to use the rename command.


rename 's/.html$/.php/' *.html
No Comments »