Internet Speed Test with CLI

  1. sudo apt-get install python-pip
  2. sudo easy_install speedtest-cli
  3. Execute "speedtest-cli"

SpeedTest - more accurate

sudo apt-get install git

sudo apt-get install build-essential libcurl4-openssl-dev libxml2-dev libssl-dev cmake

git clone

cd SpeedTest/

cmake -DCMAKE_BUILD_TYPE=Release .

sudo make install

Disable/Enable Services at Boot time


sudo update-rc.d minidlna defaults

This should add the service to the automatic startup system. But if you get:

System start/stop links for /etc/init.d/minidlna already exist.

Do the command

sudo update-rc.d minidlna enable

Gnome hangs with ldap authentication


  auth sufficient
  account sufficient
  password sufficient

Mount Drives with Current User (easier)

sudo mount -t cifs //crh16vadvinstal/richware ./VisualStudio -o username=$USER,uid=`id | sed -e 's/.*uid=//' -e 's/(.*$//'`,gid=254000513,rw

PHP Settings - Force Update

If php settings do not take
(get the path)
php -i|grep php.ini
sudo service httpd reload
Redirecting to /bin/systemctl reload httpd.service
sudo service php-fpm restart
Redirecting to /bin/systemctl restart php-fpm.service

Increase drive space in CentOS (or "Linux LVM" volumes)

New instructions --------------------------------------------------
# Install growpart yum install cloud-utils-growpart -y # Increase the drive space in VMware or VBox # (For Linux LVM volumes) # See the space is not there yet df -h # Get and note the Volume Group vgs # Get the last partition number. This is what will grow # Starting from 1, count all "part" in the "TYPE" colum # Note that number down sudo lsblk # Grow the partition using the number from lsblk # This example is using drive /dev/sda and partition 4 sudo growpart /dev/sda 4 # Resize the Volume Group partition. It will match the # last part that you counted in lsblk pvresize /dev/sda4 # Extend the Volume Group to max out the size # My Volume Group name is "cs", so this example is: sudo lvextend -l +100%FREE /dev/mapper/cs-root # Now grow the partition to [all] the available space # on the Volume Group sudo xfs_grow -d /dev/mapper/cs-root # Verify that the drive space is increased df -h

Add disk space to any Linux drive Online

#install growpart if it's not already installed
sudo apt-get install cloud-guest-utils
su (must be root to do an online disk rescan)
echo 1 > /sys/block/sdX/device/rescan    (where X = your disk. Use sudo fdisk -l to get)
/sbin/resize2fs /dev/sd#
^D  #to quit su
#should now show the updated drive space
df -h 

Delete Files Older Than x Days on Linux Lowell Heddings Updated Feb 1, 2017, 10:04 pm EDT | 1 min read The find utility on linux allows you to pass in a bunch of interesting arguments, including one to execute another command on each file. We’ll use this in order to figure out what files are older than a certain number of days, and then use the rm command to delete them. Command Syntax find /path/to/files* -mtime +5 -exec rm {} \; Note that there are spaces between rm, {}, and \; Explanation The first argument is the path to the files. This can be a path, a directory, or a wildcard as in the example above. I would recommend using the full path, and make sure that you run the command without the exec rm to make sure you are getting the right results. The second argument, -mtime, is used to specify the number of days old that the file is. If you enter +5, it will find files older than 5 days. The third argument, -exec, allows you to pass in a command such as rm. The {} \; at the end is required to end the command.

VirtualBox (vbox) List Running VMs from console

#!/bin/bash vboxmanage list runningvms | while read line; do #echo "VBoxManage controlvm $uuid savestate;" echo $line if [[ $line =~ \{(.*)\} ]] then vboxmanage controlvm ${BASH_REMATCH[1]} savestate fi done

Code to help out links to folders

In Apache/httpd 
 <Directory "/var/www"> 
 AllowOverride None 
 Require all granted 
 <Directory /var/www/> 
 AllowOverride All 
 Options Indexes FollowSymLinks 

.nanorc  Nano

#set mouse
set linenumbers
set smarthome
set smooth
set trimblanks

mp3wrap - combining mp3 files

mp3wrap so that you can put them in order
find . -maxdepth 1 -iname '*.mp3' -print0 | sort -z | xargs -0 mp3wrap ~/output.mp3