Thanks to antville.org
while loop

This is a sample shell script while loop

while read mydb
do
echo "time scp /home/backup/mysql/$mydb/ticket.txt.gz 1.2.3.4:/tmp/$mydb.txt.gz "
done << dblist
akolaII
akol
ako
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 "75.142.246.205" |uniq | awk -F. {'print $1"."$2"."$3"/24"'} |uniq

114.80.93/24
119.63.193/24
124.115.0/24
205.234.253/24

... 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 (22 comments) ... Comment


find dead processes

The 8th column of ps aux command will list the status of the process.

ps aux | awk '{if ($8 ~ "D") print $0}'

Here is a list of the various process statuses and what they mean:

D – Uninterruptible sleep (usually a critical system process, a process that cannot be killed without rebooting)
R – Running
S – Interruptible sleep (waiting for an event to complete)
T – Stopped
Z – Defunct (“zombie”) process

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


connect to AWS

It is possible to use password to connect to AWS

1) change config file
sudo vi /etc/ssh/sshd_config

PermitRootLogin yes
PasswordAuthentication yes

2) restart
sudo service ssh restart

3) add a password
sudo passwd root

4) ssh without key
ssh root@xxx.com

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


upgrade ubuntu

Upgrade from 14.04 to 15.04 is a 2 step journey.

sudo nano /etc/update-manager/release-upgrades
change the value to normal

And then use this command twice!
sudo do-release-upgrade

You can check your ubuntu version:

lsb_release -a
Description: Ubuntu 15.04

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


Libre office on centOS

Here is how to install Libre office on centOS

64 bit
wget download.documentfoundation.org

32 bit
wget download.documentfoundation.org

tar xvf LibreOffice_4.4.4_Linux_x86_rpm.tar.gz

rpm -Uvh LibreOffice_4.4.4.3_Linux_x86_rpm/RPMS/*.rpm

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


manage iso image file

Here is how you can open and copy files from an iso image.

mkdir /mnt/iso
mount -t iso9660 -o loop /root/Downloads/ubuntu-15.04-desktop-i386.iso /mnt/iso/

ls /mnt/iso/

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


Create a Reverse SSH Tunnel

on Remote server:
ssh -fN -R 7000:localhost:22 username@yourMachine-ipaddress

Now do an ssh connection request from your machine to your own machine at port 7000:
ssh username@localhost -p 7000

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


avoid key prompt

Here is a simple tip that will avoid RSA key fingerprint authentication. Edit /etc/ssh/ssh_config for global configuration or ~/.ssh/config for user-specific configuration.

Host 192.168.0.*
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null

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


Online for 6367 days
Last modified: 1/29/20 11:15 AM
Status
Youre not logged in ... Login
Menu
... Home
... Tags

Search
Calendar
January 2020
SunMonTueWedThuFriSat
1234
567891011
12131415161718
19202122232425
262728293031
December
Recent updates
LibreOffice version conflict I am
not able to install latest version of Libre office. I...
by shantanuo (1/29/20 11:15 AM)
Amazing! Yeahh! you have an
informative blog so far. Thanks for sharing | roof repair...
by Danielperez123 (1/28/20 8:32 PM)
Great Work Thanks for sharing
the post. Microsoft toolkit
by talisasoto1989 (1/27/20 10:22 PM)
Farnham Carpet Cleaning Thanks Farnham
Carpet Cleaning
by Dubs@gl.com (1/27/20 10:13 PM)
Locksmith Guildford That's an interesting
point Locksmith in Guildford
by Dubs@gl.com (1/27/20 10:11 PM)
while loop This is
a sample shell script while loop while read mydb do echo...
by shantanuo (1/26/20 2:24 PM)
compare mysql schema And here
is poor man's schema compare using good old diff command......
by shantanuo (1/26/20 1:49 PM)
Selecting from error log grep
"error" error_log |awk -F[ {'print $4'} \ | sort |...
by shantanuo (1/26/20 12:40 PM)
Rank mysql records using variables
SET @rank = 0, @prev_val = NULL; SELECT rank, correct...
by shantanuo (1/26/20 11:45 AM)
Thanks for sharing this!!
commercial roofing huntsville al
by Mazikeen (1/24/20 6:37 PM)
Sophie Chciałbym więcej o tym
przeczytać. Szybka, jaka literatura ma studiować? texas colleges and universities
by panistefanin (1/24/20 3:45 PM)
Jack Lovely information thank you
very much decanters
by decanter2020 (1/24/20 1:20 PM)
I like it I like
that logic. interior painting
by LisaCook (1/23/20 10:11 PM)
Love it I like this!
Thanks for posting roll off canister
by LaurenHill (1/23/20 10:05 PM)
Thanks for the heads up!
Thank you for sharing this. Our website
by mozaic (1/23/20 2:32 PM)
Thank you for sharing
a really great piece of information. bubble shooter
by longjumper (1/21/20 11:05 AM)
Thanks Thanks for sharing these.
Sam H - Interior Painter Scaumburg Il
by Samh2019 (1/21/20 10:14 AM)
Fencing in Guildford thanks for
the information Fencing in Guildford Fencing in Surrey
by Dubs (1/20/20 9:26 PM)
satta matka matka boss satta
matka Visit our site for more information
by sattamatka3.net (1/20/20 7:52 PM)
Beebeetravvel Thanks for sharing your
valuable information. we are a tour & travel agency with...
by coolexusa (1/20/20 2:27 PM)
Access Control System Dubai Fingerprintdubai
Company is providing many types of Services like , card...
by coolexusa (1/20/20 12:19 PM)
Air Duct Cleaning This type
of Duct cleaning Miami is absolutely not a must have...
by coolexusa (1/20/20 11:26 AM)
Carpet Cleaning Oxford and Surrounding
Areas Interesting read. Carpet cleaning in Oxford and surrounding areas
by Murray Whelehan (1/19/20 8:18 PM)
Antares AutoTune Crack License
Key With Keygen ( MAC ) A Antares AutoTune Pro Crack...
by ijicrackgh (1/19/20 9:50 AM)
Waves Tune Real-Time Crack (Latest)
Free Download 2020! Visit my site and free crack full...
by ijicrackgh (1/19/20 9:45 AM)

RSS feed

Made with Antville
Helma Object Publisher