Moin,
do you look for a common way to find (and delete) files with the suffix ".orig"? I'm not firm with the commands you posted (Slackware?), but for such tasks
find is your friend:
Code:
find /etc -type f -name '*.orig' -print0 | xargs -0 rm
find ~ -type f -name '*.orig' -print0 | xargs -0 rm
The commands recursively search in
/etc and your
HOME for all regular files with the suffix .orig and print the pathnames. The output is piped to the
xargs command which executes the
rm for each file. It is possible to execute the
rm within the
find (
find ... -exec rm {}\;) but this will start a new process for each file.
xargs collects as much file names as possible for one command execution.
The "-print0" and the "-0" options use 0x00 as separator instead of \n to avoid problems with blanks and other special characters in file names.
hth
Jan