Photo

Return to home page


E-mail

fredrik.sandin@gmail.com
(encryption key)

Official webpage

ltu.se/staff/f/fresan

Address

Fredrik Sandin,
EISLAB,
Luleå tekniska universitet,
971 87 Luleå,
Sweden.


Publications with Bibtex

Profile at Google Scholar


Dircheck (2009)

Overview

Dircheck is a Python script that checks the consistency of files, without reference to a backup.

Example:

	> dircheck Notes
	Checking directory Notes
	New file "encode_dv_2.txt".
	Checking directory Notes/music
	Checking directory Notes/science
	Checking directory Notes/code

	These files are copies of eachother:
	  "Notes/quantum_gravity.txt"
	  "Notes/science/qgrav.txt"

	0 modified, 0 renamed, 0 removed, 1 new and 222 consistent files (1 copies).
	

Dircheck can help you to discover corrupt files, so that you can take appropriate actions before it is too late.

Dircheck is useful if you backup files on optical media or transfer files using a USB memory stick. If the source was checked before copy, you can run dircheck on the copy at a later time to verify that it is identical to the source at the time when the copy was made.

Download and installation

You can download dircheck here and the GPL license here.

Copy the script to, e.g., /usr/bin/ and make it executable with chmod 755 dircheck. You should also change the owner and group to that of other executables in the installation directory, e.g., chown root:root dircheck.

Description

VERSION
	
	1.4

SYNOPSIS

	./dircheck [options]   ...

OPTIONS

	-b/--batch If this option is activated the script checks
	whether the content is consistent with the checksum files
	and returns 0 (1) if they are (not). Nothing is written
	to stdout and no checksum files are modified or created.
	Observe that 0 is returned only if there is a perfect
	match between the checksum files and the content, i.e.,
	there may be no new files, no removed files, no missing
	checksum files etc. This option implies --strict.
	
	-f/--force If this option is activated the checksums of
	modified files are updated automatically and messages
	are printed to stdout to notify the user. This option
	is ignored in batch mode.
	
	-q/--quiet If this option is activated nothing is printed
	to stdout, except for a summary and eventual urgent messages
	or questions concerning modified files. This option is
	ignored in batch mode.

	-r/--readonly If this option is activated no checksum
	files are written or modified.

	-s/--strict If this option is activated the script does
	strict comparison of filenames, i.e., for two files to
	be considered equivalent they must have exactly the same
	filename in addition to equivalent sizes and checksums.
	By default fuzzy comparison of filenames is used, which
	for example means that files with identical size and
	checksum are considered identical if their filenames
	differ in case.

DESCRIPTION

	This tool checks the consistency of the content in one or
	more directories. It is complementary to backup solutions,
	because it determines if the content has been modified or
	corrupted, without reference to a backup.

	To do this, the script creates a file called .dircheck.md5
	(hereafter referred to as a 'checksum' file) in each directory,
	including subdirectories at all levels.

	This script NEVER modifies/moves/copies/deletes any files,
	except for the checksum files with name .dircheck.md5.
	
	The checksum file contains a list of md5 checksums, file
	sizes, and file names for all files in a directory. The
	information in a checksum file is stored in plain text.
	
	The first time a directory is checked the script creates
	the checksum files. When checking the same directory at a
	later time, the script compares the checksums of all files
	with the checksums stored in the checksum files. If a file
	has been modified, i.e., if the checksum or the size is
	different than that stored in the checksum file, the script
	will ask you whether you want to update the checksum file.
	This way you will notice if a file is modified or corrupt.
	The script will also tell you about duplicate files,
	moved files, renamed files and removed files.
	
	NOTE that this tool ignores timestamps and considers files
	with equivalent size and checksum to be 'equivalent'. This
	does not necessarily imply that they are binary equivalent,
	but typically they are.

License and terms of use

This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


Software

3FCS
ASOUND
CBVS
Dircheck
Etherpad Latex scripts (github)
Femtolensing calculator
Random indexing
Shellmap
SSH-distributed calculations

Technical reports

TDP derivatives (extends Appendix E/F)
Fault detection in district energy systems
Intelligent Industrial Processes

Bulletin board

Thu Oct 08, 2015
Master thesis proposal on embedded streaming text analytics.

Wed Oct 07, 2015
Gunnar Öquist fellows, vice-chancellors and representatives from research funding organisations in Sweden were invited to IVA by the Kempe Foundations to present their view on and discuss the fellowship programme. A very interesting and stimulating meeting.

Thu Sep 24, 2015
Master thesis proposal on learning condition monitoring system.

Mon Sep 14, 2015
Dr. Vasaki Ponnusamy from Quest International University in Malaysia is visiting us for one month with support from STINT.

Mon Aug 31, 2015
Sergio visits EUSIPCO 2015 and presents our paper.

Wed May 27, 2015
Sergio Martin del Campo Barraza presents his licentiate thesis on autonomous sensor systems. Congratulations! Thanks to the opponent, Karl Skretting, for his helpful questions at the seminar.

Mon Apr 27, 2015
Participated at CapoCaccia, great event! Implemented a realtime Matlab / Mex interface (screenshot) for the DAVIS device and learned more about criticality and the ROLLS.

Fri Dec 12, 2014
Gunnar Öquist Fellow ceremony. A memorable day and a great and timely opportunity. More info here.

Thu Nov 13, 2014
Received an encouraging letter from the student union. Thank you for nominating me!

Fri Nov 7, 2014
Presenting our work on interoperability by learning at BICA 2014 in Boston.

Wed Oct 1, 2014
Blerim defends his Ph.D. thesis. Congrats! See also the news article.

Thu Jun 5, 2014
Workshop on bio-inspired computation, organized at UTP, Malaysia. Thanks to STINT, UTP and MMU for support.

Fri Apr 25, 2014
Ph.D. student Sergio Martin del Campo attends MLSS2014 and presents a poster.

News archive.


Valid XHTML 1.0 Transitional