Skip to content

This script is a Bash script designed to search for files with a specific extension in a given directory and then search for a specific string within those files.

Notifications You must be signed in to change notification settings

arkanide1/bash-file-searcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

search for a specific string within files

This script is a Bash script designed to search for a specific string within files in a given directory

Installation

  1. Check Existing Command:

    First, navigate to the /usr/bin directory to check if the command name already exists using:

    ls *fileSearcher*

    or

    test -e fileSearcher && echo "Command exists." || echo "Command does not exist."
  2. Move Script to /usr/bin:

    If the command does not exist, move the script to the /usr/bin directory using:

    sudo cp fileSearcher /usr/bin
  3. Set Execution Permissions:

    Make the script executable by running:

    sudo chmod +x /usr/bin/fileSearcher

Usage

Once installed, the fileSearcher command can be used to search for files with a specific extension containing a specific string.

Example usage:

fileSearcher -t pdf -n "modules" -d ./Desktop/books
  • -t: Specify the file extension.
  • -n: Specify the string to search for.
  • -d: Specify the directory to search in.

About

This script is a Bash script designed to search for files with a specific extension in a given directory and then search for a specific string within those files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages