Skip to content

Instantly share code, notes, and snippets.

View MeenachiSundaram's full-sized avatar

MeenachiSundaram V MeenachiSundaram

View GitHub Profile
yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r) dkms -y
vagrant plugin install vagrant-vbguest
fallocate -l 50G big_file
truncate -s 50G big_file
dd of=bigfile bs=1 seek=50G count=0
@MeenachiSundaram
MeenachiSundaram / Unix Commands
Last active December 24, 2016 09:29
Unix Commands to be remembered
## rsync files
rsync -av --progress sourcefolder /destinationfolder --exclude thefoldertoexclude
## Check If file exist and do
#!/bin/bash
file="/etc/hosts"
if [ -f "$file" ]
then
echo "$file found."
else
@MeenachiSundaram
MeenachiSundaram / reanme.sh
Created November 14, 2016 10:25
script to read file with names and rename it
#!/bin/bash
#name=($@)
name=(`cat file`)
for (( i=0;i<${#name[@]}; i++ ))
do
touch ${name[$i]}
if [ $? -eq 0 ]; then
rename=$(sed 's/-/_/g' <<< ${name[$i]} )
Step 1. Check the blockdevices and the file systems that are assigned to those block devices.
lsblk
Step 2. What kind of device is sdb?
sudo lshw
or
sudo lshw | less
@MeenachiSundaram
MeenachiSundaram / docker-ubuntu-trusty.sh
Last active January 3, 2017 09:09
Installing Docker Engine and compose on Ubuntu trusty
#!/bin/bash
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv \
--keyserver hkp://ha.pool.sks-keyservers.net:80 \
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
@MeenachiSundaram
MeenachiSundaram / docker-ubuntu-xenial.sh
Created January 5, 2017 06:04
Installing docker engine and docker compose in ubuntu-xenial
#!/bin/bash
echo "Installing Docker"
#Installing Docker
sudo apt-get update -y
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv \
--keyserver hkp://ha.pool.sks-keyservers.net:80 \
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
@MeenachiSundaram
MeenachiSundaram / xampp.sh
Created January 5, 2017 06:05
downloading and installing xampp in linux
echo "Installing XAMPP"
#Installing XAMPP
mkdir /xampp
cd /xampp && wget https://www.apachefriends.org/xampp-files/5.6.28/xampp-linux-x64-5.6.28-1-installer.run
cd /xampp && chmod 755 xampp-linux-*-installer.run
@MeenachiSundaram
MeenachiSundaram / postgresql-ubuntu-xenial.sh
Created January 5, 2017 06:07
Installing PostgreSQL on Ubuntu 16.04
sudo apt-get update -y
sudo apt-get install postgresql postgresql-contrib -y
@MeenachiSundaram
MeenachiSundaram / netbeans-linux.sh
Created January 5, 2017 06:42
Installing NetBeans in linux
sudo apt-get update -y
sudo apt install default-jdk -y
mkdir /downloads
cd /downloads && wget http://download.netbeans.org/netbeans/8.2/final/bundles/netbeans-8.2-linux.sh
cd /downloads && chmod +x netbeans-8.2-linux.sh
cd /downloads && ./netbeans-8.2-linux.sh