Useful UNIX scripting command.
If you have a common file or directory that needs to be removed from a directory tree, the following command can be useful for doing this:
find <starting_from_dir> -name <dir_OR_file_name> -exec /bin/rm -rf '{}' \;
This is ideal if you have spaces in the directory name, as the traditional method of using 'find' output inside a shell program will split the strings into blocks broken by white space. This will result in incomplete directory names.
Comments (0)





