Linux Commands Examples

A great documentation place for Linux commands


mathematically and visually annotate the difference between an image and its reconstruction.


compare input-file input-file [options] output-file

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!



compare file timestamp in bash

This is because of some missing spaces. [ is a command, so it must have spaces around it and the ] is an special parameter to tell it where its comand line ends. So, your test line should look like:

if [ $file1time -gt $file2time ];


What's the quickest distro to get up and running with?

If you're used to Ubuntu, then use Ubuntu.

Also, any distribution that's modern and up-to-date are pretty standard in what they offer. The big thing that sets them apart however, are the package managers. Red Hat based distros use RPM packages and Yum-based repositories, and Debian/Ubuntu based distros use deb packages and apt.

Personally, I prefer Debian based distros. If you have doubts, there is a quiz you can take that will recommend the best distro according to your needs.


File compare on ftp-server and in a folder in Linux?

You will need to use a bash script and compare file listings in the two places. You will need to make sure that the file listings are consistent so you can compare them.


How can I compare just the file contents of two zip files


zipcmp compares the zip archives zip1 and zip2 and checks if they contain the same files, comparing their names, uncompressed sizes, and CRCs. File order and compressed size differences are ignored.


Which Linux is the most efficient?

gentoo is pretty nice but it's tough to get installed.


Advantages of Re-Compiling of Linux Kernels: Share your Ideas

Generally, unless you need a specific option not compiled into a kernel, and/or need a smaller kernel optimised for size (say for an embedded system)... not much at all. Its one of those 'if you REALLY need to ask, it probably means you don't need to do it' things.


Red Hat vs. Fedora

Red Hat Enterprise Linux (RHEL) is an enterprise-class Linux distro whose goal is long-term API/ABI stability. Fedora Linux (Fedora) is a developer-class Linux distro whose goal is to test and showcase new technologies. Every few years a new version of RHEL comes out, containing stabilized forms of the technologies previously used in Fedora.


How to show linux "cmp" command progress?

You can use PipeViewer for this

pv firstfile | cmp -l secondfile > output


Compare huge directory trees

I did this in Total Commander, using the synchronise directory feature. 1.2TB data across two drives.


Which Linux is the most efficient?

gentoo is pretty nice but it's tough to get installed.


Difference between folders

Use the following command:

diff -r folder1 folder2


Comparing files for similarities

You mught try using vimdiff or gvimdiff. However, they too find differences raather than similarities. I doubt an application for what you suggested exists.


GNU/Linux substitute for the Windows-based TreeComp tool

Take a look at FreeFileSync.


Image Settings:
-authenticate value decrypt image with this password
-channel type apply option to select image channels
-colorspace type alternate image colorspace
-compose operator set image composite operator
-compress type type of pixel compression when writing the image
-decipher filename convert cipher pixels to plain pixels
-define format:option
define one or more image format options
-density geometry horizontal and vertical density of the image
-depth value image depth
-encipher filename convert plain pixels to cipher pixels
-extract geometry extract area from image
-format "string" output formatted image characteristics
-fuzz distance colors within this distance are considered equal
-identify identify the format and characteristics of the image
-interlace type type of image interlacing scheme
-highlight-color color
emphasize pixel differences with this color
-limit type value pixel cache resource limit
-lowlight-color color
de-emphasize pixel differences with this color
-metric type measure differences between images with this metric
-monitor monitor progress
-profile filename add, delete, or apply an image profile
-quality value JPEG/MIFF/PNG compression level
-quiet suppress all warning messages
-quantize colorspace reduce colors in this colorspace
-regard-warnings pay attention to warning messages
-sampling-factor geometry
horizontal and vertical sampling factor
-seed value seed a new sequence of pseudo-random numbers
-set attribute value set an image attribute
-size geometry width and height of image
-subimage-search search for subimage
-synchronize synchronize image to storage device
-taint declare the image as modified
-transparent-color color
transparent color
-type type image type
-verbose print detailed information about the image
-virtual-pixel method
virtual pixel access method

Miscellaneous Options:
-debug events display copious debugging information
-help print program options
-log format format of debugging information
-list type print a list of supported option arguments
-version print version information

By default, the image format of ’file’ is determined by its magic number. To specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. Specify ’file’ as ’-’ for standard input or output.


Copyright (C) 1999-2012 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see file:///usr/share/doc/imagemagick/www/license.html or


The compare program is a member of the ImageMagick(1) suite of tools. Use it to mathematically and visually annotate the difference between an image and its reconstruction.

For more information about the compare command, point your browser to file:///usr/share/doc/imagemagick/www/compare.html or

see also


How can this site be more helpful to YOU ?

give  feedback