Skip to content

Instantly share code, notes, and snippets.

@jpaulin
Created July 7, 2017 07:11
Show Gist options
  • Save jpaulin/26eb77deae66ff3b1469bc136343b824 to your computer and use it in GitHub Desktop.
Save jpaulin/26eb77deae66ff3b1469bc136343b824 to your computer and use it in GitHub Desktop.
ffs (for file's sake)
# For file's sake: find file by string search (recursive from current folder)
alias ffs='find . -type f | grep -i $*'
# Usage:
#
# Find all files that contain the word 'android' in them
# ffs android
#
# Find all C source files from current folder and recursive under any subfolder:
# ffs '\.c$'
#
# Find all JavaScript files from current folder and recursive under any subfolder:
# ffs '\.js$'
# Modifying the alias
# ===================
#
# Replace the original definition above, with the definition below
# 1. Making the search case sensitive:
# alias ffs='find . -type f | grep $*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment