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
Post a Comment