Git Product home page Git Product logo

file_db's Introduction

Query your file system

The file_db tool loads the metadata of your files and directories into a PostgreSQL database, from Windows, Linux, or OSX, to allow for easy analysis and control of your file system. There is a bundled interactive shell for ease of use, or power users can hook directly into the database with custom applications and plugins, or even query the database directly with SQL.

Features

  • Load a computer's file and directory metadata into PostgresSQL, including names, sizes, checksum hashes, and things like media dimensions or length.
  • An intelligent scheduler crawls your file system for changes to keep your directory data up to date in the database, without hammering your hard drive.
  • Leverage a growing list of built-in tools to work with the data to observe trends, identify duplicate files, track file system changes, mass copy/move/delete, and more.
  • The database is accessible to query directly with SQL, so you can dig right into the data. The database contains many pre-made functions to make life easy.

Examples:

Find Duplicate Files

file_db collects a file's size and checksum hash (both MD5 and SHA-1), which can be used to compare files for duplicates. You can search for duplicates of a single file, or of a list of files (such as the contents of a directory), using the included user interface. Software developers can also leverage this feature through database functions, or direct SQL.

Search for the duplicates for a single file:

  • Via the interactive shell:

    • Input: search duplicate_file "C:\my_file.txt"
    • Output:
  • Via SQL functions:

    • Input: SELECT * FROM search_duplicate_file('C:\my_file.txt')
    • Output:
  • Direct SQL:

    • Input:
      SELECT * 
      FROM
          -- Pull the list of files to find the meta data of the comparison file
          vw_ll src
          -- Join all the files to the source file by SHA-1 hash and the file size
          INNER JOIN vw_ll dup
              on (src.sha1_hash=dup.sha1_hash and src.file_size=dup.file_size)
      WHERE
          src.full_path='C:\my_file.txt'
    • Output:

file_db's People

Contributors

robtoyota avatar

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.