Tag: bash
File integrity
A script using bash and md5sum to keep track of file integrity. # Change the separator to allow for filenames containing spaces # (the default is ” \t\n”, which confuses the for loop) IFS=$’\n’ FOLDERS=`find /Volumes/disk\ 1/Pictures/Photos -type d | sed ‘s/ /\\ /g’` for FOLDER in $FOLDERS; do # mind you, this will only […]
Script to download pictures from camera and rename them etc
1. download photos from camera and sort them by date of day in folders 2. remove possible duplicates if I did not erase camera images since last download 3. convert RAW/NEF images to a usable format All this in one single click! #!/bin/bash # Change this to where to store Photos target=/home/multimedia/Images camera=”USB PTP Class […]
Convert everything in the current directory from upper- to lowercase.
A bash script to convert everything from upper- to lowercase. “!/bin/bash for n in *; do mv $n `echo $n | tr ‘[:upper:]’ ‘[:lower:]’`; done
Copy several files to a new filename
for f in *.dist; do cp $f `basename $f .dist`; done