Git Product home page Git Product logo

agfilesystemscanner's Introduction

AgFileSystemScanner

GitHub issues GitHub forks GitHub stars GitHub license

This is a high performance, nifty, command-line tool written in c++ to navigate through the filesystem. It can be used to -

  • Find Directories, Symlinks and Files by their full/partial name.
  • Find the sizes of Directories recursively.
  • Find permissions of Filesystem Entries (POSIX-style permissions only).
  • General Navigation and exploration of the filesystem through the command-line.

Usage

fss [PATH] [options] [-r [DEPTH]] [-S|--search|--search-noext|--contains PATTERN]

Options

-r, --recursive             Recursively scan directories (can be followed by a positive integer to indicate the depth)
-p, --permissions           Show permissions of all entries
-t, --modification-time     Show time of last modification of entries

-f, --files                 Show Regular Files (normally hidden)
-l, --symlinks              Show Symlinks (normally hidden)
-s, --special               Show Special Files such as sockets, pipes, etc. (normally hidden)

-d, --dir-size              Recursively calculate and display the size of each directory

-a, --abs                   Show the absolute path of each entry without any indentation

-S, --search                Only show entries whose name completely matches the following string completely
    --search-noext          Only show entries whose name(except for the extension) completely matches the following string completely
    --contains              Only show entries whose name contains the following string completely

-e, --show-err              Show errors
-h, --help                  Print Usage Instructions

PATH is the path to the directory from which to start the scan.

Only one of the search options(-S, --search, --search-noext, --contains) can be set at a time.

The argument after the search flag is treated as the search pattern.

Examples

Print the directories in the current directory, recursively going down two levels -

fss -r 2

Print the contents of /proc, including files, symlinks and special files with their permissions -

fss "/proc" -f -l -s -p

Recursively search for all directories named proc in C:// and show their sizes, last modification times -

fss "C:/" -r -d -t -S "proc"

How to Build

Dependencies

  • Cmake (version 3.16 or above)
  • Build system such as Make or Ninja
  • Compiler with c++20 support

CMake has been used as a build system generator. Create a build directory in the root AgFileSystemScanner directory and run the following command to configure CMake -

cmake -S .. -B .

Then, to build the main executable, the following command can be run (in the build directory itself) -

cmake --build .

If the generator or compiler-toolchain needs to be changed, it can be done while configuring CMake. For example, to use NMake as a generator and GCC for compilation on Windows (instead of VS proj and the MSVC compiler), the command can be modified as follows -

cmake -S .. -B . -G "NMake Makefiles" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++

The generated program is build/src/fss (on Linux/MacOS) or build/src/fss.exe (on Windows).

How to generate Documentation

Doxygen has been used for documentating this project. The HTML files can be generated by running the following command in the docs directory -

doxygen config

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.