diffutils shipped with RHEL6.x doesn't have any option to ignore symlinks

Solution Unverified - Updated -

Issue

  • diffutils shipped with RHEL6.x doesn't have any option to ignore symlinks
# ll /tmp/diff-test/adir/x/y
lrwxrwxrwx. 1 root root 16 Nov 22 20:31 /tmp/diff-test/adir/x/y -> /tmp/diff-test/a

# ll /tmp/diff-test/bdir/x/y
lrwxrwxrwx. 1 root root 16 Nov 22 20:31 /tmp/diff-test/bdir/x/y -> /tmp/diff-test/b

# diff -rq /tmp/diff-test/adir /tmp/diff-test/bdir/
Only in /tmp/diff-test/adir/x/y: filea
Only in /tmp/diff-test/bdir/x/y: fileb
  • A new option "--no-dereference" was introduced in upstream v3.3 so that we can igonre symlinks.
# ll /tmp/diff-test/adir/x/y
lrwxrwxrwx. 1 root root 16 Nov 22 20:31 /tmp/diff-test/adir/x/y -> /tmp/diff-test/a

# ll /tmp/diff-test/bdir/x/y
lrwxrwxrwx. 1 root root 16 Nov 22 20:31 /tmp/diff-test/bdir/x/y -> /tmp/diff-test/b

# /usr/local/bin/diff -rq --no-dereference /tmp/diff-test/adir /tmp/diff-test/bdir/
Only in /tmp/diff-test/adir: 1
Only in /tmp/diff-test/bdir/: 2
Symbolic links /tmp/diff-test/adir/x/y and /tmp/diff-test/bdir/x/y differ

Environment

  • Red Hat Enterprise Linux 6
  • diffutils

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content