z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Comparing directory contents

z/OS UNIX System Services User's Guide
SA23-2279-00

You can use the command:
diff -r dir1 dir2
to check whole directories for changes. With the -r option, diff compares the files in dir1 with the files in dir2 that have the same names.

This command can be useful if you have two directories that hold different versions of the same files and subdirectories.

You can use the -r option with other commands. For example:
cp -r dir1 dir2
copies all the files and subdirectories from dir1 to dir2.
rm -r dir
removes all the files and subdirectories under dir and then removes dir itself.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014