![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cksum dependencies | vibhor_agarwali | UNIX for Advanced & Expert Users | 3 | 09-05-2007 02:38 AM |
| using cksum | leeRoberts2007 | Shell Programming and Scripting | 4 | 05-31-2007 09:30 PM |
| The cksum Problem | Dim-Wit | Shell Programming and Scripting | 7 | 08-15-2006 02:03 PM |
| cksum question | rjsha1 | Shell Programming and Scripting | 4 | 01-17-2006 11:44 AM |
| cksum parts of a file | crazykelso | UNIX for Dummies Questions & Answers | 6 | 07-30-2002 11:38 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Anyone know how cksum works?
hello all.
I'm not asking about the algorithm - or how it goes about computing the checksum - I'm asking how it views/looks at the files it does the cksum on. For instance: Say you had a directory named "dir_A" And within this directory you had some files. So: dir_A - file1 - file2 - file3 Do you have to step through dir_A and compute a cksum for EACH individual file? For instance: % cd dir_A % cksum file1 % return some number % cksum file2 % return some number % cksum file3 % return some number Or, can I just compute the cksum for the whole directory? For instance: % cksum dir_A % return some number If one of the files within dir_A changes and I redo the cksum is it safe to say that a valid cksum will be computed for the whole directory? What if file1 WITHIN dir_A changed - will the cksum change? Or, do you have to compute a cksum for each individual file? Thanks!!! |
|
||||
|
You can cksum or md5 a directory. I am able to accomplish this on FreeBSD, but under Slackware, it does not appear to work.
If you want you can redirect the md5 into a txt file, so you can check it later. Changing a file in the directory won't change the cksum, md5. (correction), but adding or removing files will. you can issue cksum A_dir md5 A_dir Last edited by locustfurnace; 10-28-2004 at 11:28 AM.. |
|
||||
|
Quote:
I did try it. It worked for me. I'm running digital unix tru64 4.0f. %cksum dir_A % 12345678 8908 dir_A I changed a file in dir_A and got another number. I was just curious if the number computed can be reliable or am I missing something... Thanks for the replies... |
|
||||
|
Quote:
I got mixed results when I tested it myself, but was unable to figure out what was going on. That's very helpful. Thanks. |
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|