Linux

Shell script for removing duplicate files

The following shell script finds duplicate (2 or more identical) files and outputs a new shell script containing commented-out rm statements for deleting them. You then have to edit the file to select which files to keep – the script can’t safely do it automatically! OUTF=rem-duplicates.sh; echo “#! /bin/sh” > $OUTF; find “$@” -type f […]

Read More
Security

md5sum av filer/bilder

For å sikre seg mot at filer er korrupt kan man benytte kommandoen md5sum Windows md5sum -b *.JPG > checksum.md5 Linux Deretter kopierer man denne md5-fila til rett katalog i Linux og tester at disse filene er identisk vha MD5Sums, et grafisk Windows program.

Read More
Linux

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 […]

Read More
Linux

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 […]

Read More