Creating a shell script to traverse a file system and hash every file -


i need create shell script traverse entire file system, hash each file, , write text database.

i doing on ubuntu 12.04 , using md5sum and, if being honest here, don't know begin. , appreciated!

this may take time compute:

find / -type f -exec md5sum {} + >my_database.md5 

how works

  • find

    find utility can traverse entire filesystems

  • /

    this tells find start @ root of filesystem.

  • -type f

    this tells find find regular files

  • -exec md5sum {} +

    this tells find run md5sum on each of files found.

  • >my_database.md5

    this tells shell redirect output command file.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -