Thanks to
Why do I care for Linux?

I don't care that much for other software. Linux is more than a kernel or an operating system. It is a symbol money does not rule everything. You don't pay for Linux. You don't have to watch ads when using it. In return, please be a little more friendly and tolerant to the people who build it. While Linux is built by professionals today, there is more heart and soul poured into it than in other operating systems.

... Link (0 comments) ... Comment

backup mysql users 

3 steps to install percona utility...

yum install perl-DBI perl-Data-Dumper perl-DBD-MySQL


perl pt-show-grants -h -uroot -pPasswd

... Link (0 comments) ... Comment

clear tmp folder

Here is following commands to clear unwanted stuff from the /tmp partition on the server?

tmpwatch –mtime –all 48 /tmp

The above command will remove all files and folders from the /tmp which have not been accessed in the last couple of days (24×2=48). You can modify the number of hours as required.

... Link (0 comments) ... Comment

change your server time to IST

If you need to change your server clock to another timezone for e.g. (Indian Standard Time), you can do so by modifying the /etc/localtime file:

mv /etc/localtime /etc/localtime.bak

ln -s /usr/share/zoneinfo/Asia/Calcutta /etc/localtime

... Link (0 comments) ... Comment

Transfer root emails to another email address

If you have root access to the server then open the file /etc/aliases in your favorite editor. Look for the section Person who should get root mail and make the change as required.

vim /etc/aliases

Person who should get root’s mail  ##

... Link (0 comments) ... Comment

special strings in cron

Instead of the first five fields, you can use any one of eight special strings. It will not just save your time but it will improve readability.

Special string    Meaning
@reboot ——> Run once, at startup.
@yearly ——> Run once a year, “0 0 1 1 *”.
@annually –> (same as @yearly)
@monthly —> Run once a month, “0 0 1 * *”.
@weekly —–> Run once a week, “0 0 * * 0″.
@daily ——–> Run once a day, “0 0 * * *”.
@midnight –> (same as @daily)
@hourly —–> Run once an hour, “0 * * * *”.

For e.g. run ntpdate every hour:
@hourly /path/to/ntpdatevim /etc/ssh/sshd_config

... Link (0 comments) ... Comment

while loop

This is a sample shell script while loop

while read mydb
echo "time scp /home/backup/mysql/$mydb/ticket.txt.gz$mydb.txt.gz "
done << dblist

... Link (0 comments) ... Comment

Selecting from error log

grep "error" error_log |awk -F[ {'print $4'} \
| sort | sed -e 's/]//g' | grep -v "/var/www/html/" \
| grep -v "/usr/local/src/code" | awk {'print $2'} \
| grep -v "" |uniq | awk -F. {'print $1"."$2"."$3"/24"'} |uniq


... Link (0 comments) ... Comment

mysql and shell command

date -d"-1 day ago" +'%b%d'

equals to

mysql -Bse"select date_format(date(date_add(now() , interval 1 day)),'%b%d')"

... Link (0 comments) ... Comment

Managing Amazon keys

Use this command to convert private key to public key.

ssh-keygen -y -f dec15a.pem >

Now upload the new public key to list of keys on Amazon so that you can connect to your instances in that region using the same pem key.

... Link (0 comments) ... Comment

Online for 7404 days
Last modified: 10/5/22, 9:05 AM
Youre not logged in ... Login
... Home
... Tags

December 2022
Recent updates
Short english words in Devanagari
The list of short english words written in Devanagari. #...
by shantanuo (10/5/22, 9:05 AM)
Card issuing banks CITI
Standard Chartered HSBC American Express HDFC ICICI AXIS INDUS IND Kotak...
by shantanuo (7/16/22, 4:46 AM)
Activate IAM Access To activate
the Activate IAM Access setting, you must log in to...
by shantanuo (7/12/22, 5:52 AM)
use cheat instead of man
wget gunzip cheat-linux-arm64.gz chmod 770 cheat-linux-arm64 ./cheat-linux-arm64 mv cheat-linux-arm64...
by shantanuo (7/4/22, 8:53 AM)
python module itertools list of
useful methods of itertools module. permutations combinations combinations_with_replacement zip_longest count...
by shantanuo (9/8/21, 7:50 AM)
wikipedia tools 1) Collection of
useful utilities 2) all history of a user
by shantanuo (8/20/21, 6:36 AM)
Duration/Term of Copyright In the
case of original literary, dramatic, musical and artistic works, the...
by shantanuo (8/20/21, 6:26 AM)
Preserve seeds 6 types of
seeds to be preserved for next season. 1) laal Mula...
by shantanuo (5/7/21, 5:46 AM)
Why do I care for
Linux? I don't care that much for other software. Linux...
by shantanuo (12/17/20, 9:27 AM)
important leafy vegetables 1. Amaranthus
caudatus: rajgira. 2. Amaranthus tricolor: Math.  (Chhoti Chulai- Hindi, Cheera-...
by shantanuo (4/12/20, 2:01 PM)
program creek program creek
seems to be a good site for handy references of python...
by shantanuo (4/11/20, 11:24 AM)
Standard out to a file
This code will change the standard out to a file...
by shantanuo (4/11/20, 11:18 AM)
Create config file for AWS
command line tool While creating amazon config file in a...
by shantanuo (2/20/20, 6:00 AM)
setting colors in pandas This
is how to set the colors in pandas mapper =...
by shantanuo (2/20/20, 5:53 AM)
log mysql output tee output.txt
show global variables; show engine innodb status\G show full processlist;...
by shantanuo (2/19/20, 10:33 AM)
access AWS API gateway using
python Amazon API gateway allows us to host serverless API's...
by shantanuo (2/16/20, 9:41 AM)
Using boto In the bad
old days, the glacier class used to have different layers....
by shantanuo (2/15/20, 10:28 AM)
backup mysql users  3
steps to install percona utility... yum install perl-DBI perl-Data-Dumper perl-DBD-MySQL wget...
by shantanuo (2/13/20, 1:49 PM)
Steps to be used for
generating AWS API gateway a) Method Execution - Get Method...
by shantanuo (2/13/20, 1:30 PM)
apply colors to pandas Here
is how to change the color of negative values to...
by shantanuo (2/12/20, 8:57 AM)
Holidays in India These are
the common holidays celebrated in India (Mumbai) during 2016 -...
by shantanuo (2/11/20, 1:53 PM)
change log file size in
MySQL Here are the steps to be followed while changing...
by shantanuo (2/11/20, 10:38 AM)
MySQL common error messages 1146
Table does not exist 1054 column does not exist 1062...
by shantanuo (2/11/20, 10:13 AM)
ipython parallel demo First start
ipython in cluster mode ipcluster start -n 4 from IPython.parallel...
by shantanuo (2/9/20, 9:02 AM)
djanog settings You may see
this message if you have DEBUG = True in your...
by shantanuo (2/9/20, 4:07 AM)

RSS feed

Made with Antville
Helma Object Publisher