mysql and shell command
mysql and shell command May 16, 2018 7:47:18 AM CAT May 16, 2018 7:47:18 AM CATshantanuodate -d"-1 day ago" +'%b%d' equals to mysql -Bse"select date_format(date(date_add(now() , interval 1 day)),'%b%d')"
View ArticleSelecting from error log
Selecting from error log January 26, 2020 10:40:26 AM GMT January 26, 2020 10:40:26 AM GMTshantanuogrep "error" error_log |awk -F[ {'print $4'} \| sort | sed -e 's/]//g' | grep -v "/var/www/html/" \|...
View Articlewhile loop
while loop January 26, 2020 12:24:23 PM GMT January 26, 2020 12:24:23 PM GMTshantanuoThis is a sample shell script while loop while read mydbdoecho "time scp /home/backup/mysql/$mydb/ticket.txt.gz...
View Articlespecial strings in cron
special strings in cron February 8, 2020 2:30:01 PM GMT February 8, 2020 2:30:01 PM GMTshantanuoInstead of the first five fields, you can use any one of eight special strings. It will not just save...
View ArticleTransfer root emails to another email address
Transfer root emails to another email address February 8, 2020 2:32:42 PM GMT February 8, 2020 2:32:42 PM GMTshantanuoIf you have root access to the server then open the file /etc/aliases in your...
View Articlechange your server time to IST
change your server time to IST February 8, 2020 2:39:38 PM GMT February 8, 2020 2:39:38 PM GMTshantanuoIf you need to change your server clock to another timezone for e.g. (Indian Standard Time), you...
View Articleclear tmp folder
clear tmp folder February 8, 2020 2:41:13 PM GMT February 8, 2020 2:41:13 PM GMTshantanuoHere is following commands to clear unwanted stuff from the /tmp partition on the server? tmpwatch –mtime –all...
View Articlebackup mysql users
backup mysql users February 13, 2020 1:49:56 PM GMT February 13, 2020 1:49:56 PM GMTshantanuo3 steps to install perconal utility... yum install perl-DBI perl-Data-Dumper perl-DBD-MySQL wget...
View ArticleManaging Amazon keys
Managing Amazon keys October 9, 2017 5:04:43 AM GMT October 9, 2017 5:04:43 AM GMTshantanuoUse this command to convert private key to public key. ssh-keygen -y -f dec15a.pem > dec15a.pub Now upload...
View ArticleWhy do I care for Linux?
Why do I care for Linux? December 17, 2020 9:27:17 AM GMT December 17, 2020 9:27:17 AM GMTshantanuoI don't care that much for other software. Linux is more than a kernel or an operating system. It is a...
View Article
More Pages to Explore .....