Skip to content

Unix shell function to illustrate multi-processing.

Notifications You must be signed in to change notification settings

JulienElkaim/RSFind

Repository files navigation

Super Shell Function - RsFind

School Project December 2018

Introduction

This repo is a shell function working on Unix systems. It's rôle is to concate find, ls and grep functions to recursively find relevant files / folders based on user's inputs and allow to execute commands on its output. It's provided with multiple options :

  • l, (--list) is a display option : request to display relevant information on files. Display mode based on ls -l.
  • t (--text) is a filter option : request to filter files containing the specified string.
  • i (--image) is a filter option : request to filter files with MIME type containing image.
  • n (--name) is a filter option : request to filter files with the requested name provided to this option.
  • e (--exec) is the exec function : request to apply commands provided thereafter to rsfind output.
  • p (--print) is the print option : request to display files found by rsfind.

Technical dimension

Our choices are explained in an extensive report .
We use asynchrone parsing for the recursive search. Also, we have chosen to use a recursive structure to simulate a list type object (with some helper function to obtain a "list flavour" behavior) .
We choose this structure to avoid recomputing some data when combining multiple options. Also, it makes the process much easier ans faster as we apply options in smart way in order to reduce more as possible the process load.
In order to execute commands on outputs, we use pipes between processes and manage them with signals.

About

Unix shell function to illustrate multi-processing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published