-
Deleting files from a directory based on search
I need to delete files from a directory based on a search string. I tried:
grep -iL include * | rm -f
("include" is the string I was looking for)
This did not delete the files. The grep command alone found the correct files, but I can't pipe the results to the remove command.
Can anyone help me complete this task? Am I taking the wrong approach, or can I use the rm command on the results of a grep?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|