Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sum(1) [bsd man page]

SUM(1)							      General Commands Manual							    SUM(1)

sum - sum and count blocks in a file SYNOPSIS
Sum calculates and prints a 16-bit checksum for the named file, and also prints the number of blocks in the file. It is typically used to look for bad spots, or to validate a file communicated over some transmission line. SEE ALSO
`Read error' is indistinguishable from end of file on most devices; check the block count. 7th Edition April 29, 1985 SUM(1)

Check Out this Related Man Page

SUM(1)								   User Commands							    SUM(1)

sum - checksum and count the blocks in a file SYNOPSIS
Print checksum and block counts for each FILE. -r use BSD sum algorithm, use 1K blocks -s, --sysv use System V sum algorithm, use 512 bytes blocks --help display this help and exit --version output version information and exit With no FILE, or when FILE is -, read standard input. AUTHOR
Written by Kayvan Aghaiepour and David MacKenzie. REPORTING BUGS
Report sum bugs to GNU coreutils home page: <> General help using GNU software: <> COPYRIGHT
Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for sum is maintained as a Texinfo manual. If the info and sum programs are properly installed at your site, the command info coreutils 'sum invocation' should give you access to the complete manual. GNU coreutils 7.1 July 2010 SUM(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix Arithmatic operation issue , datatype issue

Hi, I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ). Eg: 0000001 0000220 0001235 0000022 0000023 ........... ......... ........ Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies

2. Shell Programming and Scripting

summing numbers in files

I am trying to take two files and add the numbers from each. There is a total of 5192 numbers in each file and I want to add them row by row... ie. first row of file 1 + first row of file 2 = first row of output. Eventually I will be summing 40401 of these files together but starting with 2 just... (21 Replies)
Discussion started by: pattywac
21 Replies

3. Solaris

Coredumps and swap - was part of Solaris Mem Consumption

We have Sun OS running on spark : SunOS ciniwnpr67 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-V440 Having Physical RAM : Sol10box # prtconf | grep Mem Memory size: 8192 Megabytes My Top Output is : 130 processes: 129 sleeping, 1 on cpu CPU states: 98.8% idle, 0.2% user, 1.0%... (39 Replies)
Discussion started by: rajwinder
39 Replies

4. Solaris

Solaris Mem Consumption

We have Sun OS running on spark : SunOS ciniwnpr67 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-V440 Having Physical RAM : Sol10box # prtconf | grep Mem Memory size: 8192 Megabytes My Top Output is : 130 processes: 129 sleeping, 1 on cpu CPU states: 98.8% idle, 0.2% user, 1.0%... (27 Replies)
Discussion started by: rajwinder
27 Replies

5. Shell Programming and Scripting

how to add up a total in a summary report?

Hi all i got a script up but i cant add up the summary report.. keep having synax error . mind helping me to take a look and tell me what went wrong.. i know is a bit long but i hope someone can hep me with it. thanks the error message come up when i try to run the sumary report.. i guess... (16 Replies)
Discussion started by: xiaojesus
16 Replies

6. Shell Programming and Scripting

Column sum group by uniq records

Dear All, I want to get help for below case. I have a file like this. saman 1 gihan 2 saman 4 ravi 1 ravi 2 so i want to get the result, saman 5 gihan 2 ravi 3 like this. Pls help me. (17 Replies)
Discussion started by: Nayanajith
17 Replies

7. Shell Programming and Scripting

Summary using awk

Displaying information using awk Hey guys, i am using awk to display my information in a certain order. Database : Persia:42:John France:50:Mabel Persia:50:Rach Germany:60:JohnMy expected output is : ... (25 Replies)
Discussion started by: gregarion
25 Replies

8. UNIX for Advanced & Expert Users

How to sum a column 2 and column 3

Hi, Im looking for a script which will calculate the unique strings column 2 & 3 values in a log as mentioned in example eg:- bag 12 12 bag 18 15 bags 15 13 bags 15 14 blazer 24 24 blazer 33 32 boots 19 15 Result should be:- bag 30 27 bags 30 27... (32 Replies)
Discussion started by: Paulwintech
32 Replies

9. Shell Programming and Scripting

Modification of Summation Script

hi guys, i have a script that basically just sums up the values of 2 particular columns in a file, grouped by the columns specified as well The script is quite long, but it's basically just repetitive.. just for each condition. This script only accepts one type of input file. ... (22 Replies)
Discussion started by: ramneim
22 Replies

10. Shell Programming and Scripting

Making a script to copy files not seen before (using md5sum)

Hello, I would like to make a script that searches through a SRC folder and copies only files it's never seen before to a DEST folder. SRC = /user/.phonesync/photos-backup DST = /usr/.phonesync/photos-new So basically, I'd start with a: md5sum /user/.phonesync/photos-backup/* >... (29 Replies)
Discussion started by: nbsparks
29 Replies

11. Shell Programming and Scripting

Md5sum is running very slowly

Hi, I am trying to get the hash values of md5 of a string. I am on Redhat Linux. using the 25-27 field in the file I need to generate the md5 and append it at the end of the record as a new field. I have tried the below code but its painfully slow. can you please suggest any alternatives or... (21 Replies)
Discussion started by: ahmedwaseem2000
21 Replies

12. Shell Programming and Scripting

Honey, I broke awk! (duplicate line removal in 30M line 3.7GB csv file)

I have a script that builds a database ~30 million lines, ~3.7 GB .cvs file. After multiple optimzations It takes about 62 min to bring in and parse all the files and used to take 10 min to remove duplicates until I was requested to add another column. I am using the highly optimized awk code: awk... (34 Replies)
Discussion started by: Michael Stora
34 Replies

13. UNIX for Dummies Questions & Answers

Script that sums the contents of a folder (help me)

I'm looking for a script that sums the contents of a folder, When you give a parameter to the script , i want to know the size of the directory, the number of files, number of folders, These are commands that I have already found du -s find . -type f | wc -l find . -type d | wc -ly ... (19 Replies)
Discussion started by: Roggy
19 Replies

14. UNIX for Advanced & Expert Users

Resume from last failed command

Dear Experts, I am creating a shell script (A) which is menu driven and in turn calls another shell scripts (X) depending on the selection. X has a list of commands which runs batch jobs in auto mode. Content of X ./sqr.ksh axhri051_sf axhri051_sf.par $1 $2 XHRPPYOV; ./sqr.ksh axbni062... (19 Replies)
Discussion started by: rprasad
19 Replies

15. UNIX for Beginners Questions & Answers

Compare sum of two columns if variance is zero do nothing else send an email

11☺Hi, I have to data sets: One is in .txt format and other is in .csv format, please refer below two outputs from two files. File1.txt SOURCE PAYDATE TOTAL_DOLLARS RECORD_COUNT ASSET 05/25/2018 247643.94 ASSET 06/20/2018 ... (27 Replies)
Discussion started by: Tahir_M
27 Replies

Featured Tech Videos