LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-14-2009, 06:11 PM   #1
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Rep: Reputation: 30
how do i md5 hash all files in a sub-folder and save it as a file?


right i've got it done (unless you know a better way) but it doesn't follow symlinks

Code:
find /folder -name "*" -type f -size +1M -exec md5sum {} \; > file.txt
so how do i make it follow symlinks?
 
Old 09-14-2009, 06:26 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
The -L option to find follows symlinks.

This gives you:

Code:
find -L -type f -name "*" -size +1M -exec md5sum {} \; > file.txt
Just a note which you may or may not be aware of, if you truly want all filenames, you don't need to put -name "*", just leave it out. However, this will also match hidden files like .filename (which what you have will not), so it may not be what you want.

HTH

Forrest
 
Old 09-14-2009, 06:38 PM   #3
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
nice one thank you!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
md5 hash files mattydee Linux - Security 3 05-07-2008 06:42 PM
need help unpacking hmac-md5 hash into md5 hash lynx5 Programming 3 02-02-2008 04:06 PM
save web page results in a file and a folder. Whats the folder for? geeyathink General 2 01-30-2008 06:57 AM
checking MD5 hash issey Linux - Newbie 4 03-31-2005 01:15 AM
MD5 hash value dominant Linux - Newbie 2 05-07-2004 03:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration