Linux: Compare directory contents
Under Linux you can compare the contents of different directories quickly and easily with a simple console command. You can find out how this works here.
Compare directory content on Linux
To examine the contents of two directories for differences in content, the console command "diff" is the right tool.
- Open a text console by entering the "Terminal" command on the Debian search function, for example. Alternatively, you can go from the graphical user interface to a text-oriented console by pressing the [CTRL] - [ALT] and [F2 - F6] keys.
- Enter the command according to the following pattern: "diff [parameter] [directory_1] [directory_2]". For example: "diff -rq directory_1 directory_2". The parameter "r" means that existing subdirectories are also searched. The "q" parameter specifies that only files that are not contained in the other directory are displayed.
- So that the result output remains clear even with large directories, you can have it written directly to a file. To do this, simply add "> [name of the result file]" to the above command. You can then display this file at any time with the commands "more" "less" or "cat".
This practical tip shows you how to read out the processor temperature under Linux.