Posts

Showing posts from April, 2020

AND and OR Operators in Bash scripting

Image
Hey guys, here we will discuss how to use AND and OR Operator in Bash Scripting,  AND operator we can mention AND operator "-a"  "&" simple example for AND Operator. #!/bin/bash echo "Enter SSC marks: "  read SSC echo "Enter Inter Marks: "   read Inter if [ $SSC -ge 70  -a  $Inter -gt 60 ] #if [ $SSC -ge 70 ] & [ $Inter -ge 60 ] then         echo "Candidate Eligible" else echo "Candidate Not Eligible" fi OR Operator we can mention AND operator "-o"  "||" simple example for OR Operator. #!/bin/bash echo "Enter SSC Percentage: "  read SSC echo "Enter Inter Percentage: "   read Inter #if [ $SSC -ge 70  -o  $Inter -gt 60 ] if [ $SSC -ge 70 ] || [ $Inter -ge 60 ] then         echo "Candidate Eligible" else echo "Candidate Not Eligible" fi

How to use Crontab Command

Image
Crontab: It is used to Schedule jobs. Crontab –l : -l is used to List out the job for current user. Crontab –e :-e is used to  edit  schedule jobs  for current user.   Crontab –r :-r is used to remove all job for current user. Note : Don't try this command until unless remove jobs. Crontab –e –u <Username>  : It is used to edit jobs for particular user.  Cat /etc/crontab :  It used to check cron job info. */1 * * *  * /root/cpu.sh  *      * * * * Minute     Hour Day  Month Day of week   # Example of job definition: # .---------------- minute (0 - 59) # |  .------------- hour (0 - 23) # |  |  .---------- day of month (1 - 31) # |  |  |  . ------- month (1 - 12) OR Jan, feb,mar,apr ... # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR  # |  |  |  |  | # *  *  *...

Awk command with simple examples

Image
Now, we are going to learn very interesting and Most important  in  Linux Why late lets know about Awk command,one of the mostly used command in scripting. awk command used to manipulate data | using this AWK command we can generate specified reports as per our requirement. Syntax : awk ‘BEGIN {start_action} {action} END {stop_action}’ filename let me explain about awk command with simple examples Example 1: How to print entire   data of the file cat filename | awk '{print}' cat filename | awk '{print$0}' both " awk '{print}' and  awk '{print$0}'  " used to print entire date Example 2: How to print  very first column cat filename|  awk '{print$1}' awk '{print$1}'  used to print very first column   awk '{print$1}'   used to print second column   Example 3: How to print p attern Matching Technique in Awk. free -m | awk '{/Mem/print}' here, we are matching Mem using  awk '{...

sed command with examples | Linux in Telugu

Image
It used to replacing,searching,delete,insert data & also is mostly used command in scripting why late lets know about sed command. systax   sed OPTIONS... [SCRIPT] [INPUTFILE...]  Example:1 How to replace word with another word name. cat nagios.txt | sed 's/Nagios/nagios/' here,we replaced Nagios with nagios  Example:2 How to replace word with another word name using global variable. cat nagios.txt | sed 's/Nagios/nagios/g' here,we replaced Nagios with nagios  all places Example:3 How to replace word with another word name nth line. cat nagios.txt | sed 's/Nagios/nagios/'2g' here,we replaced Nagios with nagios  up to second line Example:4 How to replace word with another word name in specific line. cat nagios.txt | sed '2 s/Nagios/nagios/' here,we replaced Nagios with nagios  in second line only ---------------------------------------- How to delete lines from a particular file. 1.To Delete a particular line s...

Else if statement with examples | Shell scripting

Image
#!/bin/bash read -p "Enter numeric value: " EnteredValue if [ $EnteredValue -gt  90] then     echo "Entered Value is greater than 90" fi ======================================= #!/bin/bash read -p "Enter numeric value: " EnteredValue if [ $EnteredValue -gt 90 ] then     echo "Entered Value is greater than 90" else     echo "Entered Value is less than 90" fi exit ========================================= #!/bin/bash read -p "Enter numeric value: " EnteredValue if [ $EnteredValue -ge 90 ] then     echo "Entered Value is greater than 90" elif [ $EnteredValue -ge 70 ] then     echo "Entered Value is greater than 70" else      echo "Enterted Value is less 70" fi

DevOps Tutorials In Telugu

Image
What is Devops ? Definition : Devops is set of “practices” or “Methods” Continues Delivery Continues integration  Continues Testing, Deployment, Monitoring and logging.  Why Devops ? •Improve Productivity •2016 , 66% Global Origination's adopted •2019 , 80% Global Origination's •Reduce Implementation failures, Recovery time How Devops will work ? Development -->   Build  -->  QA  -->  Pre-Production --> Monitoring & Logging   -->  CM

Payload update | How to fly on Helicopter in Pubg | Pubg Tricks in Telugu

Image

How to reduce LVM partition size in RHEL and CentOS

Image
Now we are going to learn very useful & interesting topic "How to reduce/extend LVM size" with real time example.hope this article very helpful for you. For example scenario, I have added some storage space to linux machine,we need to scan hosts to display in linux machine,  we can scan all hots/LUN's by using below commands at the time. ------------------------------------------------------  Use below command to scan hosts/LUN's. ls /sys/class/scsi_host/ | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan ; done  Use below command to verify newly added device/stroage #lsblk Use below command to format /dev/sdb #fdisk /dev/sdb Below commands helpful for complete format. #n #p enter enter #t #8e p #wq Below command used to update partition info to kernal. partprobe /dev/sdb1 try below command to create pv(Physical volume) #pvcreate /dec/sdb1 Try below command to create volume group #vgcreate VG0...

Linux Introduction In Telugu

Creating and Managing Files & Directories User Administration Creating Standard Partitions and LVM Files & Directory Permissions. Access Control List Package Management (RPM & YUM) Linux Network Administration Installing and Configuring NIC Cards Creating Static IP Address IPv4 and IPv6 subnet NIC bonding, Teaming Static routing Configuration Network Packet Tracing and Filtering Linux Server Administration NFS Server, Secure NFS and Autofs SSH and Syslog Server LDAP Server and Client Configuration Samba, Kickstart and KVM (Virtualization) DNS, DHCP, FTP, NTP, SMTP, HTTP & HTTPS Firewalld and SELinux Remote Storage Management (iSCSI) Troubleshooting and Breaking forgotten Root user password

rsync Command Examples | rsync Command In Telugu

Image
Hey! Well come back! Here, we are going to learn very useful command rsync. basically rsync is used to sync file system with same structure. It also used to data backup/copy. rsync is free command line utility & In most of the system it available defiantly. We can install rsync utility in debian based system using below command apt-get install rsync We can install rsync utility in redhat based system using below command yum install rsync Below command used to copy files without using option rsync /root/Desktop/original/* /root/Desktop/backup/ Below command used for recursive copy, it means with sub folders. rsync -avhr /root/Desktop/original/* /root/Desktop/backup/ Here     -a is used for archive data.     -v is used for show output.     -h is used for show copied data in MB's,it means human              readable  format. Below command used for include or exclude  rsync -avz --in...

Mostly used ftp commands In Linux on Telugu

Image
Hi guys ! here we are going to learn mostly used ftp commnads Below command is used to create user(raja) -d option is used to create user with home -s used for mention  login ,/bin/false means we are restricting ftp user. useradd raja -d /home/raja -s /bin/false Below command is used to assign owner permission. chown raja:raja /home/raja Below command is used to change user passwd passwd raja Using below path we can do required settings for ftp logins. vi /etc/vsftpd/user_list My vsftpd.config file configuration as below anonymous_enable=YES local_enable=YES write_enable=YES local_umask=022 anon_upload_enable=YES dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES xferlog_std_format=YES chroot_local_user=YES chroot_list_enable=YES listen=NO listen_ipv6=YES pam_service_name=vsftpd userlist_enable=YES tcp_wrappers=YES userlist_file=/etc/vsftpd/user_list userlist_deny=NO #chroot_list_file=/etc/vsftpd/vsftpd.chroot_list allow...

Linux blog

Image

Mostly used windows commands

Commands use Secpol.msc Local security Policy Gpedit.msc  group policy edit Msconfig32 Safe mode Devmgmt.msc Device management Ncpa.cpl Network adapter Mstsc Remote desktop Msra Remote assistance Gpupdate Group policy update Cleanmgr Disk cleanup Dfg.msc defragmentation Diskpart Partition manager Lusrmgr.msc Local user manager Ipconfig /all all networks settings Ipconfig /release IP Configurations cancels maps Ipconfig /renew Renew Ip configuration maps Logoff Logoff Control mouse Mouse properties Control keyboard Keyboard properties Osk On screen keyboard Netsetup.cpl Network configuration Control netconnect Network connections Services.msc Console management services Msconfig System configuration utility Taskmgr Task manager Firewall.cpl ...