linux - bash script to get files from a dir and compare them with another dir -



linux - bash script to get files from a dir and compare them with another dir -

suppose have dir1 files ( t1.txt, t2.txt, t3.txt) how can list of files name in bash script allows me compare list of files in dir2 , find missing files without using rsync

diff -r --brief dir1 dir2

will tell differences between 2 directories, including when 1 directory contains file other 1 doesn't. incidentally, tell if dir1 , dir2 both contain files same name, t1.txt, different contents. won't print files same between 2 directories.

linux bash centos ls

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -