Pages tagged with grep

  • Find and replace - Find ignoring a file In this example excluding todo.txt prevents an infinate loop that would otherwise result in todo.txt growing to fill all space on the hard disk. find . -type f \( -name "*.txt" ! -name "todo.txt" \) -exec grep "TODO" -iHn {} \; &...
  • Extract filenames from file - grep for word in file | remove spaces | remove unwanted text | do op on file grep whatever whatever.log | sed 's/ /\\ /g' | sed 's/whatever//g' | xargs ls -l Example: List infected files clamscan -r -lclamscan.log / recursively scans all files and ...
Go to top

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top