Skip to content

Instantly share code, notes, and snippets.

View johncf's full-sized avatar

John Charankattu johncf

View GitHub Profile
@johncf
johncf / find.sh
Last active April 20, 2024 20:32 — forked from gr1ev0us/find.sh
Cheatsheet for find linux
# Based on: https://alvinalexander.com/unix/edu/examples/find.shtml
# basic 'find file' commands
# --------------------------
find / -name foo.txt -type f -print # find regular files under / with name foo.txt
find / -name foo.txt -type f # -print is the default action, and may be omitted
find . -name foo.txt # search under the current dir, and all types
find . -name "foo*" -type d # wildcard name-matching, and only directories
find /opt /usr /var -name foo.scala -type f # search multiple dirs
find . -iname foo # case-insensitive: foo, Foo, FOo, FOO, etc.