FG

How to diff file names in two directories (without writing to intermediate files)?

Fresh3 days ago
Mar 15, 202635215 views
Confidence Score0%
0%

Problem

I am trying to do something along the lines of: But that doesn't work for obvious reasons. Is there a better way of achieving this (in 1 line), than this? Thanks

Error Output

diff `ls -1a ./dir1` `ls -1a ./dir2`

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to diff file names in two directories (without writing to intermediate files)?

Low Risk

You were close. In bash you want process substitution, not command substitution:

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment