Created
May 16, 2012 07:55
-
-
Save lushchick/2708487 to your computer and use it in GitHub Desktop.
Bash tricks
This file contains 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 | |
# Rename multiple files | |
for i in *.html; do mv $i ${i%.*}.tpl; done; | |
# Create file of specified size (1G) | |
dd if=/dev/zero of=sparse_file bs=1073741824 skip=1073741824 count=1 | |
# Resample images so height and width aren't greater than specified size. Save in thumbnails folder | |
for i in Photo*.jpg; do sips -Z 100 $i --out thumbnails/${i%.*}_thumb.${i##*.}; done | |
# Reset VM | |
VBoxManage controlvm Debian reset | |
# MacPorts | |
# set system default PHP version to 5.4 | |
sudo port select --set php php54 | |
# Resume VM | |
VBoxManage startvm Debian --type headless | |
# Save VM state | |
VBoxManage controlvm Debian savestate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment