The first part of this command (find ./ -name "*~") finds all the files in the current directory (./) or its subdirectories with a name that ends in a tilde (*~). This list is then piped to xargs, which adds each input value to its own rm command. Problems can arise if filenames contain spaces, since by default xargs uses both spaces and newlines as item delimiters. The -d "\n" option tells xargs to use only newlines as delimiters, thus avoiding this proble...
- Chapter 1: Exploring Linux Command-Line Tools
- from LPIC-1: Linux Professional Institute Certification Study Guide: (Exams 101 and 102), 3rd Edition
- Publisher: Sybex
- Released: January 2013
backticks vs xargs
Share this highlighthttp://www.safaribooksonline.com/a/lpic-1-linux-professional/2339/