This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r) dkms -y | |
| vagrant plugin install vagrant-vbguest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fallocate -l 50G big_file | |
| truncate -s 50G big_file | |
| dd of=bigfile bs=1 seek=50G count=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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]} ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get update -y | |
| sudo apt-get install postgresql postgresql-contrib -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |