Image manipulation
Rename and autorotate images using jhead
jhead -autorot -nf%y%m%d-%H%M%S *.jpg
Options:
Rename and autorotate images using jhead
jhead -autorot -nf%y%m%d-%H%M%S *.jpg
Options:
Mysql DB create and Grant User
--------------
Four commands to create a mysql Database, create user and grant privileges on the created DB
**Replace dbname, username and host with your own values:**
1. login to mysql (entering root password)
mysql -u root -p
2. Create DB
Bash script to convert filenames to lowercase and spaces in hypens
#!/bin/bash for x in ./*; do if [ -f "$x" ]; then lc=${x,,} # convert all letters to lowercase y=${lc// /-} # replace spaces by hyphens if [ "$x" != "$y" ]; then mv "$x" "$y" fi fi done
Bash script to capitalise filenames recursively