Personal tools
You are here: Home Plone XP Open Source Software Review Finding in Linux

Finding in Linux

— filed under: ,

Talking about how to find things in Linux: find and grep.  This is example driven story providing hands on tips for finding thing: files, string, etc.

find for finding files

Find all files starts with work in current folder and all of its subfolder:

$ find . -name work*

Find all files ends with .pyc or .pyo in current folder and all of its subfolder, and remove them:

$ find . -name '*.py[co]' -exec rm -f {} +

We also can find files/folders by modified time:

$ find . -mtime -60

Option -atime is used to find files last accessed.

grep for finding strings / patterns from files

Document Actions