Shell

How to Restart Network on Ubuntu 16.04 Xenial Linux

Ubuntu Server 16.04 LTS isn't managed with NetworkManager and does not come installed by default like it did in prior… Read More

May 24, 2016 9:17 pm

Find Large Files

find /var/www -type f -size +10240k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'… Read More

November 8, 2012 8:55 am

Create Swap File

#!/bin/bash -e # Set default variable values : ${SWAP_SIZE_MEGABYTES:=1024} : ${SWAP_FILE_LOCATION:=/var/swap.space} if (( $SWAP_SIZE_MEGABYTES <= 0 )); then echo 'No… Read More

November 8, 2012 8:54 am

Find Directories & Add Group Sticky Bit

Probably make another post explaining what a sticky bit is and how it's used, but for now I'm giving you… Read More

November 8, 2012 8:52 am

Output Directories to Shell

find . -maxdepth 99 -mindepth 1 -type d -printf %P\\n ls -1l | grep '^d' | awk '{print $8}' find… Read More

November 8, 2012 8:49 am

CHMOD Directories Only

Change UNIX permissions on directories only. find . -type d -print0 | xargs -0 chmod 755 Read More

November 8, 2012 8:46 am