Archive

Posts Tagged ‘file’

Linux Daily Tip – Bulk Delete Files By Name

April 28th, 2010 CoreCount No comments

Ever find yourself tediously removing files by hand, across a large, complex directory structure? Luckily, there’s a simply, easy way to delete files, as long as they have a part of their name in common.

For example, to delete all PDF files in this directory, recursively, run

find . -name "*.pdf" -exec rm -f {} \;

Linux Daily Tip – Recursive Grep

April 27th, 2010 Tyler Bishop No comments

At times it becomes annoying trying to find a string within a file fast and effectively. Grep can handle this task for us!

To search all files and sub-directories recursively for a phrase:

grep -r -i string_your_looking_for /
highslide wordpress