Pages tagged with xargs

I'm still in the process of tagging pages that were migrated from the old site, so for now you're best off using the search engine rather than relying on the tags.

  • xargs - The xargs command is commonly used with find to perform a command on each of files that match the search criteria, by piping the results of the find command into xargs. find ./ -type f -print xargs -i mv -f {} ./newdir T...
  • Find files containing a pattern - You can find files with grep or find with grep. Using grep grep -riHn [pattern] . This will recursively find all files under the current directory (and it’s subdirectories) that contain the given pattern. The flags are as follows: r recursive...
  • 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...

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