Wednesday, September 3, 2014

Rename Multiple File In One Command

Rename Multiple File In One Command


for FILE in *.txt ; do mv $FILE $FILE-04092014 ; done

Tuesday, August 19, 2014

Keys

VMware Workstation V.10 Key

HA4FW-8G052-DZ8Q0-U295P-83KLV
5F4PK-42181-9ZXP9-T31Q6-1CVKM
JY468-44L9M-DZ479-3UA72-CAKHR

4F6Z5-80H42-FZ889-L007M-ACJJN
5F6E9-DHL4J-HZ640-KLA70-8C0NN
1Z0G9-67285-FZG78-ZL3Q2-234JG
4C4EK-89KDL-5ZFP9-1LA5P-2A0J0
HY086-4T01N-CZ3U0-CV0QM-13DNU

5U4GA-DQ09H-EZK48-YTAQP-83K79
NU4FQ-DFH40-0ZA01-8A37K-32RKL
HF0DA-FF086-VZ739-AA87H-236M4
HF0A8-FMJ1P-1Z1U1-LK1N2-9AGKJ
5A477-D3284-3ZUF0-2K154-23R0P
MY47Y-2MK1M-6ZQC0-7J05M-8A60D
5V6K2-29243-HZDV0-VVA76-93A2R
NA28T-DR114-AZ9Z8-R1250-93U27
MF4JG-4H3DK-NZ3L0-KHCNM-8AMNP
NA6F3-2HKEM-6ZDF8-Q18N6-33DNN
1Y2FZ-AHJ5H-6ZU09-DKA5M-82RQ7
5U6KQ-6M240-LZMW1-U13N2-AAX7X
HA4FW-8G052-DZ8Q0-U295P-83KLV
5F4PK-42181-9ZXP9-T31Q6-1CVKM
JY468-44L9M-DZ479-3UA72-CAKHR
4F6Z5-80H42-FZ889-L007M-ACJJN
5F6E9-DHL4J-HZ640-KLA70-8C0NN

Wednesday, July 16, 2014

Life Lesson

Life Lesson

1. Life isn’t fair, but it’s still good.
2. When in doubt, just take the next small step.
3. Life is too short – enjoy it.
4. Your job won’t take care of you when you are sick. Your friends and family will.
5. Pay off your credit cards every month.
6. You don’t have to win every argument. Stay true to yourself.
7. Cry with someone. It’s more healing than crying alone.
8. It’s OK to get angry with God. He can take it.
9. Save for retirement starting with your first paycheck.
10. When it comes to chocolate, resistance is futile.
11. Make peace with your past so it won’t screw up the present.
12. It’s OK to let your children see you cry.
13. Don’t compare your life to others. You have no idea what their journey is all about.
14. If a relationship has to be a secret, you shouldn’t be in it.
15. Everything can change in the blink of an eye But don’t worry; God never blinks.
16. Take a deep breath. It calms the mind.
17. Get rid of anything that isn’t useful. Clutter weighs you down in many ways.
18. Whatever doesn’t kill you really does make you stronger.
19. It’s never too late to be happy. But it’s all up to you and no one else.
20. When it comes to going after what you love in life, don’t take no for an answer.
21. Burn the candles, use the nice sheets, wear the fancy lingerie. Don’t save it for a special occasion. Today is special.
22. Over prepare, then go with the flow.
23. Be eccentric now. Don’t wait for old age to wear purple.
24. The most important sex organ is the brain.
25. No one is in charge of your happiness but you.
26. Frame every so-called disaster with these words ‘In five years, will this matter?’
27. Always choose life.
28. Forgive
29. What other people think of you is none of your business.
30. Time heals almost everything. Give time time.
31. However good or bad a situation is, it will change.
32. Don’t take yourself so seriously. No one else does.
33. Believe in miracles.
34. God loves you because of who God is, not because of anything you did or didn’t do.
35. Don’t audit life. Show up and make the most of it now.
36. Growing old beats the alternative — dying young.
37. Your children get only one childhood.
38. All that truly matters in the end is that you loved.
39. Get outside every day. Miracles are waiting everywhere.
40. If we all threw our problems in a pile and saw everyone else’s, we’d grab ours back.
41. Envy is a waste of time. Accept what you already have not what you need.
42. The best is yet to come…
43. No matter how you feel, get up, dress up and show up.
44. Yield.
45. Life isn’t tied with a bow, but it’s still a gift.”


From: http://socialmeems.com/2014/07/14/45-lessons-life-taught

DRINK WATER ON EMPTY STOMACH

DRINK WATER ON EMPTY STOMACH

It is popular in Japan today to drink water immediately after waking up every morning. Furthermore, scientific tests have proven its value. We publish below a description of use of water for our readers. For old and serious diseases as well as modern illnesses the water treatment had been found successful by a Japanese medical society as a 100% cure for the following diseases:
Headache, body ache, heart system, arthritis, fast heart beat, epilepsy, excess fatness, bronchitis asthma, TB, meningitis, kidney and urine diseases, vomiting, gastritis, diarrhea, piles, diabetes, constipation, all eye diseases, womb, cancer and menstrual disorders, ear nose and throat diseases.
METHOD OF TREATMENT
1. As you wake up in the morning before brushing teeth, drink 4 x 160ml glasses of water
2. Brush and clean the mouth but do not eat or drink anything for 45 minute
3.. After 45 minutes you may eat and drink as normal.
4. After 15 minutes of breakfast, lunch and dinner do not eat or drink anything for 2 hours
5. Those who are old or sick and are unable to drink 4 glasses of water at the beginning may commence by taking little water and gradually increase it to 4 glasses per day.
6. The above method of treatment will cure diseases of the sick and others can enjoy a healthy life.
The following list gives the number of days of treatment required to cure/control/reduce main diseases:
1. High Blood Pressure (30 days)
2. Gastric (10 days)
3. Diabetes (30 days)
4. Constipation (10 days)
5. Cancer (180 days)
6. TB (90 days)
7. Arthritis patients should follow the above treatment only for 3 days in the 1st week, and from 2nd week onwards – daily..
This treatment method has no side effects, however at the commencement of treatment you may have to urinate a few times.
It is better if we continue this and make this procedure as a routine work in our life. Drink Water and Stay healthy and Active.
This makes sense .. The Chinese and Japanese drink hot tea with their meals not cold water. Maybe it is time we adopt their drinking habit while eating!!! Nothing to lose, everything to gain...
For those who like to drink cold water, this article is applicable to you.
It is nice to have a cup of cold drink after a meal. However, the cold water will solidify the oily stuff that you have just consumed. It will slow down the digestion.
For more Health,Love,Life Tips, Inspirational,Love,Heart Touching Viral Stories
Please Visit www.SocialMeems.com
Once this 'sludge' reacts with the acid, it will break down and be absorbed by the intestine faster than the solid food. It will line the intestine.
Very soon, this will turn into fats and lead to cancer. It is best to drink hot soup or warm water after a meal.
A serious note about heart attacks:
• Women should know that not every heart attack symptom is going to be the left arm hurting,
• Be aware of intense pain in the jaw line.
• You may never have the first chest pain during the course of a heart attack.
• Nausea and intense sweating are also common symptoms.
• 60% of people who have a heart attack while they are asleep do not wake up.
• Pain in the jaw can wake you from a sound sleep. Let's be careful and be aware. The more we know, the better chance we could survive...
A cardiologist says if everyone who gets this mail sends it to everyone they know, you can be sure that we'll save at least one life.
Please be a true friend and send this article to all your friends you care about.
PLEASE DON'T IGNORE SHARE IT. THIS MIGHT SAVE SOMEONE'S LIFE.
For more Health,Love,Life Tips, Inspirational,Love,Heart Touching Viral Stories
Please Visit www.SocialMeems.com

Monday, June 30, 2014

Script Clean Up Data

Script Clean Up Data

#!/bin/bash

# Variables
DATE=`date +%Y-%m-%d`
YEAR=`date +%Y`
THISMONTH=`date +%m`
LASTMONTH=`date +'%m' -d 'last month'`
DAYTH=`date +%d`
ERROR=/opt/scripts/error.log
ERROR1=/opt/scripts/error1.log
LOG=/opt/scripts/log.log
error=0

# Clean up Netflow Data last month older then 7 days
DATA_LASTMONTH=/data/nfsen/profiles-data/live/r4/$YEAR/$LASTMONTH/
find $NETFLOW_DATA_LASTMONTH -type d -mtime +7 -exec rm -rf {} 2>> $ERROR \;

# Clean up Netflow Data this month older then 7 days
DATA_THISMONTH=/data/nfsen/profiles-data/live/r4/$YEAR/$THISMONTH/
find $NETFLOW_DATA_THISMONTH -type d -mtime +7 -exec rm -rf {} 2>> $ERROR \;

# Clean up other file-*
find /data/all -name "file.*" -mtime +7 -exec rm -f {} 2>> $ERROR \;
find /data/dns -name "file.*" -mtime +7 -exec rm -f {} 2>> $ERROR \;
find /hoststats/data/ssh -name "file.*" -mtime +7 -exec rm -f {} 2>> $ERROR \;
find /data/telnet -name "file.*" -mtime +7 -exec rm -f {} 2>> $ERROR \;

#Check Error
/bin/cat $ERROR >> $ERROR1
        if test -s $ERROR;
  then
                error=1
        fi
sleep 2
if [ "$error" = 1 ];
then
        # Create email
        echo "From: Netflow " >> /var/tmp/mail.txt
        echo "Subject: Clean Up Netflow Files" >> /var/tmp/mail.txt
        echo " " >> /var/tmp/mail.txt
        echo "CHECK ERROR IN 12.13.14.15 in /opt/scripts/log.log"  >> /var/tmp/mail.txt
        echo "###################################################" >> /var/tmp/mail.txt
        echo "Kind of error: "  >> /var/tmp/mail.txt
        echo "---------------------------------------------------" >> /var/tmp/mail.txt
        `/bin/cat $ERROR1 >> /var/tmp/mail.txt`
        echo "###################################################" >> /var/tmp/mail.txt


        echo "CHECK THE SERVER IP 12.13.14.15" >> /var/tmp/mail.txt

        mail -s "ERROR Cleanup Netflow Data"  ken.vannakk@gmail.com < /var/tmp/mail.txt
        echo "ERROR!!!!" >> $LOG
        /bin/cat $ERROR >> $LOG
        #Delete Log
        rm /var/tmp/mail.txt
        rm $ERROR
        rm $ERROR1
fi
echo "FINISH Cleanup Netflow Data:" $DATE >> $LOG

Script Check Disk Spaces

Script Check Disk Spaces

#!/bin/bash

# This script is going to check /data if less then 200GB it going to send mail
DATA=`df | awk '/\/data/ {print $4}'`
if test $DATA -le 200000000
then
     df | mail -s "/data on Netfolw server is nearly full" ken.vannakk@gmail.com
fi

Tuesday, June 24, 2014

Scripts Check 2 directories

#!/bin/bash
# This script is going to verify make sure all users are backup.

# Home user : /home/[0-9] and /home/[a-z]
# Home backup user: /homebackup/[0-9] and /homebackup/[a-z]

for users in {0..9} {a..z}; do
diff /home/$users/ /homebackup/$users/ | grep /home/$users/ | awk '{print $4}' >> /opt/scripts/differences.txt
done
sed -i -e "/and/d" /opt/scripts/differences.txt

# Check file content
FILE=/opt/scripts/differences.txt
        if [[ -s $FILE ]] ; then
                echo "Has some difference."
                echo "Email Users not backup are:" >> /opt/scripts/mail.tmp
                echo "" >> /opt/scripts/mail.tmp
                        cat /opt/scripts/differences.txt >> /opt/scripts/mail.tmp
                echo "" >> /opt/scripts/mail.tmp
                echo "Please check MX01." >> /opt/scripts/mail.tmp
        mail -s "Mail User Not Backup" ken.vannakk@gmail.com < /opt/scripts/mail.tmp
        # Remove file
        rm /opt/scripts/differences.txt
        rm /opt/scripts/mail.tmp
        else
                echo "No difference."
        # Remove file
        rm /opt/scripts/differences.txt
        fi
# End
==================================================
#!/bin/bash

# This script is going to verify make sure all users are backup.
HOMEUSER=/home/vmail
BACKUPUSER=/homebackup/vmail

# Check the the difference between HOMEUSER and BACKUPUSER
diff $HOMEUSER $BACKUPUSER | grep $HOMEUSER | awk '{print $4}' > /opt/scripts/differences.txt
sed -i -e "/and/d" /opt/scripts/differences.txt

# Check file content
FILE=/opt/scripts/differences.txt
        if [[ -s $FILE ]] ; then
                echo "Has some difference."
                echo "Email Users not backup are:" >> /opt/scripts/vmail.tmp
                echo "" >> /opt/scripts/vmail.tmp
                        cat /opt/scripts/differences.txt >> /opt/scripts/vmail.tmp
                echo "" >> /opt/scripts/vmail.tmp
                echo "Please check MX01." >> /opt/scripts/vmail.tmp
        mail -s "Mail User Not Backup" ken.vannakk@gmail.com < /opt/scripts/vmail.tmp
        # Remove file
        rm /opt/scripts/differences.txt
        rm /opt/scripts/vmail.tmp
        else
                echo "No difference."
        # Remove file
        rm /opt/scripts/differences.txt
        fi
# End