Skip to content

Instantly share code, notes, and snippets.

@mindon
Last active January 16, 2019 03:45
Show Gist options
  • Select an option

  • Save mindon/e78bf4cc9180d64e20f50f571daf12a8 to your computer and use it in GitHub Desktop.

Select an option

Save mindon/e78bf4cc9180d64e20f50f571daf12a8 to your computer and use it in GitHub Desktop.
List files in one folder but not in another
#/bin/sh
# only files, subfolders excluded
# example diff <(ls -FL ./one/ | grep -v /) <(ls -FL ./another/ | grep -v /) | awk '{if($1=="<") print $2;}'
diff <(ls -FL $1 | grep -v /) <(ls -FL $2 | grep -v /) | awk '{if($1=="<") print $2;}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment