Terminal commands

A small site with collection by smart-ass commands

Compare two folders’ contents

$ diff -rq folder1 folder2
Only in comments_new: config.php
Only in comments_old: config_old.php
Only in comments_old: functions.inc

Exclude pattern/text/suffix

$ diff -rqx '*.inc' folder1 folder2
Only in comments_new: config.php
Only in comments_old: config_old.php


  • diff (find differences between two files)
  • -r, When comparing directories, recursively compare any subdirectories found.
  • -q, Report only whether the files differ, not the details of the differences.
  • -x, pattern - When comparing directories, ignore files and subdirectories whose basenames match pattern.

(Source: unixhelp.ed.ac.uk)

  1. terminalcommands posted this
blog comments powered by Disqus