09-04-2015
Quote:
Originally Posted by
Khan28
Yes that does - but do I keep that as the bench mark to check if the file is corrupted or not ..
Absolutely, md5sum or shasum is the right way to check the file integrity.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
This is my worst nightmare in recent years!!!
I spent two days writing a proposal due tomorrow, ftp'ed the Word doc to a Unix machine in ASCII mode (i forgot to turn BIN on). Then I was trying to help a colleague download it and I accidently download the ASCII file back to the same dir on my... (1 Reply)
Discussion started by: venkir
1 Replies
2. UNIX for Dummies Questions & Answers
HI
I need to validate a file in UNIX to contain only ascii characters.This is a production issue.Can anyone help with the command?
Thanks
Subbarao (1 Reply)
Discussion started by: srichakra9
1 Replies
3. Shell Programming and Scripting
Hello,
How to i determine via ftp commandline if files on ftp server is ascii or binary files. Like every other comon windows ftp program does it automatically.
regards
Thomas (5 Replies)
Discussion started by: congo
5 Replies
4. UNIX for Advanced & Expert Users
Hi,
I am having unix script that passes argument value to script. The script finds the file and keeps it in a directory.
I need to ftp this file to another server. Please guide me how to acieve this.
I am able to connect to ftp server but i am not able to use the unix argument in the ftp... (0 Replies)
Discussion started by: pyaranoid
0 Replies
5. Shell Programming and Scripting
Hi,
I want to compare the size of the files in my local machine before ftp ing it and the size of the file in the remote machine i.e after ftping . SO that the ftp is successful . (3 Replies)
Discussion started by: dineshr85
3 Replies
6. Shell Programming and Scripting
hi
i am receiving a file from one system , i have to verify the format of the file data i.e whether the data is in acii format or binary format,
please help
thanks in advance
satya (1 Reply)
Discussion started by: Satyak
1 Replies
7. Shell Programming and Scripting
Hi,
is there a way to check if the initial few characters are ebcdic or ascii in a file? (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies
8. Solaris
The system is a SunFire V440 running SunOS 5.10
About once every 3-4 weeks, the system will reboot into single user mode on its own, and then I run svcs -xv, the filesystem service and dependent services will be disabled due to the metadisk file system being corrupted.
The I've been doing... (2 Replies)
Discussion started by: the.gooch
2 Replies
9. Shell Programming and Scripting
Hi,
I need to have a shell script that FTP's a zipped file from a particular location.
I have some path and inside that path i will have folders like x_timestamp and inside x_timestamp there may many folders based upon events like y_111,y_222,y_333.Inside each event there will be another... (3 Replies)
Discussion started by: weknowd
3 Replies
10. UNIX for Beginners Questions & Answers
So, i have this requirement where i need to check the file format, whether it's EBCDIC or ASCII, and based on format retrieve the information from that file:
my file is:
file1.txt-->this ebcdic file
file2.txt-->ascii file
i tried below code:
file=file1.txt
type="`file $file`"
i get... (7 Replies)
Discussion started by: gnnsprapa
7 Replies
LEARN ABOUT MOJAVE
shasum5.18
SHASUM(1) Perl Programmers Reference Guide SHASUM(1)
NAME
shasum - Print or Check SHA Checksums
SYNOPSIS
Usage: shasum [OPTION]... [FILE]...
Print or check SHA checksums.
With no FILE, or when FILE is -, read standard input.
-a, --algorithm 1 (default), 224, 256, 384, 512, 512224, 512256
-b, --binary read in binary mode
-c, --check read SHA sums from the FILEs and check them
-t, --text read in text mode (default)
-p, --portable read in portable mode
produces same digest on Windows/Unix/Mac
-0, --01 read in BITS mode
ASCII '0' interpreted as 0-bit,
ASCII '1' interpreted as 1-bit,
all other characters ignored
The following two options are useful only when verifying checksums:
-s, --status don't output anything, status code shows success
-w, --warn warn about improperly formatted checksum lines
-h, --help display this help and exit
-v, --version output version information and exit
When verifying SHA-512/224 or SHA-512/256 checksums, indicate the
algorithm explicitly using the -a option, e.g.
shasum -a 512224 -c checksumfile
The sums are computed as described in FIPS-180-4. When checking, the
input should be a former output of this program. The default mode is to
print a line with checksum, a character indicating type (`*' for binary,
` ' for text, `?' for portable, `^' for BITS), and name for each FILE.
Report shasum bugs to mshelor@cpan.org
DESCRIPTION
Running shasum is often the quickest way to compute SHA message digests. The user simply feeds data to the script through files or
standard input, and then collects the results from standard output.
The following command shows how to compute digests for typical inputs such as the NIST test vector "abc":
perl -e "print qq(abc)" | shasum
Or, if you want to use SHA-256 instead of the default SHA-1, simply say:
perl -e "print qq(abc)" | shasum -a 256
Since shasum mimics the behavior of the combined GNU sha1sum, sha224sum, sha256sum, sha384sum, and sha512sum programs, you can install this
script as a convenient drop-in replacement.
Unlike the GNU programs, shasum encompasses the full SHA standard by allowing partial-byte inputs. This is accomplished through the BITS
option (-0). The following example computes the SHA-224 digest of the 7-bit message 0001100:
perl -e "print qq(0001100)" | shasum -0 -a 224
AUTHOR
Copyright (c) 2003-2013 Mark Shelor <mshelor@cpan.org>.
SEE ALSO
shasum is implemented using the Perl module Digest::SHA or Digest::SHA::PurePerl.
perl v5.18.2 2018-08-17 SHASUM(1)