Skip to content

Instantly share code, notes, and snippets.

@tspicer
tspicer / gist:fce40c53db64df5188e1
Created July 29, 2014 16:39
remove files without touch subdir
find /path/ -type f -print0 | xargs -0 -I file rm -f file
@tspicer
tspicer / resize-root-volume-ec2
Created February 14, 2014 14:23
Resize Root Volume Linux on EC2
Stop the instance
Create a snapshot from the volume
Create a new volume based on the snapshot increasing the size
Check and remember the current's volume mount point (i.e. /dev/sda1)
Detach current volume
Attach the recently created volume to the instance
Access via SSH to the instance and run fdisk /dev/<volume>
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u')
@tspicer
tspicer / gist:8310181
Created January 8, 2014 01:34
Changing the time on the CentOS servers
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime