Giter Club home page Giter Club logo

file-indexer's Introduction

File-indexer

2017 Unique Studio lab assignment 1

A simple file indexer.

Usage

To make index for a dir.

./make_index [path]

The data will be saved in a hidden file named .index.dat

Do efficent searching in this file

./indexed_search .index.dat [a world]

The word should only contain number, letter and underline.

Features

Using Multi - threaded programming method to increase the efficiency.

Using Queue and Hash table, easily saving and searching words.

Example

sh$./make_index /usr/include
Done. Used 8.546137s
Data saved to .index.dat
sh$./indexed_search .index.dat sha256
Searching in .index.dat
File Numes:39968
/usr/include/openssl-1.0/openssl/obj_mac.h:4
/usr/include/openssl/obj_mac.h:4
/usr/include/nettle/hmac.h:1
/usr/include/libcryptsetup.h:1
/usr/include/ostree-1/ostree-core.h:3
/usr/include/ostree-1/ostree-repo.h:4
/usr/include/autoopts/usage-txt.h:1
/usr/include/autoopts/options.h:1
/usr/include/mbedtls/entropy.h:1
/usr/include/mbedtls/ssl_internal.h:1
/usr/include/mbedtls/sha256.h:1
/usr/include/mbedtls/config.h:1
/usr/include/mbedtls/compat-1.3.h:1
/usr/include/ext2fs/ext2fs.h:1
Done. Used 0.262550s

file-indexer's People

Contributors

zxc479773533 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.