Cksum read error for directory - Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris Cksum read error for directory - Solaris 10
# 1  
Old 03-20-2014
Cksum read error for directory - Solaris 10

Hi,

I am getting read error when i run cksum </dir> but this command runs successfully for the files and in different server it runs for both files and directories. I am using in both the servers solaris 10 with patch 148888-03. Please suggest...

Code:
# cksum ravi(directory)
3454912345      0 ravi [read error]

Thanks in advance...
# 2  
Old 03-20-2014
Assuming: You want to checksum the directory file itself ( that is what your command seems to imply) then you need read and execute privilege on ravi. You can also get errors when the directory file is corrupted.

What does the command ls -ld ./ravi show? Please post the output.


What are you trying to do? it sounds like you want to checksum everything in the directory.

Maybe like this?:
Code:
cksum $(find ./ravi -type f)

This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 03-21-2014
Hi Jim,

Thanks for you reply..

I want to run chsum on directory so that it will show the chsum value and size of the directory (like below output) here we can see the 96 as the size of directory but from my first post we can see the cksum value but it can't show the size of the directory.

# cksum alerts
1721028050 96 alerts
#ls -ld alerts
drwxr-xr-x 4 user5 other 43 Mar 21 06:00 alerts

I ran truss for the command then it is showing error while reading here is the output where we are getting error.

read(3, 0x0002260A, 4096) Err#21 EISDIR
close(3) = 0
ioctl(1, TCGETA, 0xFFBFED14) = 0
fstat64(1, 0xFFBFEC30) = 0
4294967295 0 lib [read error]write(1, " 4 2 9 4 9 6 7 2 9 5\t 0".., 29) = 29

write(1, "\n", 1) = 1
_exit(1)

As you suggested, Please find below output. I logged in the server as root.

#ls -ld ravi
drwxr-xr-x 4 ramesh other 43 Mar 21 06:00 ravi
# 4  
Old 03-21-2014
Hi.

Many years ago in SunOS, one could use a number of standard commands on directories. AFAIK, that cannot be done these days.

Linux cksum produces:
Code:
$ cksum cohorts/
cksum: cohorts/: Is a directory

which is a useful error message.

Whereas, as you have noticed:
Code:
vm-solaris ~ $ cksum Desktop/
4294967295      0       Desktop/ [read error]

In other words (from my perpective) you cannot do that.

Best wishes ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to read this Solaris version:-Solaris 8 HW 5/03 s28s_hw2wos_06a SPARC?

Hi Guys, Could you please tell me how to read this Solaris version:- Solaris 8 HW 5/03 s28s_hw2wos_06a SPARC Thanks. (3 Replies)
Discussion started by: manalisharmabe
3 Replies

2. AIX

Directory csum / cksum

I've created a directory in /tmp/csum-test on AIX 6.1. Then another under AIX 7.1 host called /tmp/csum-test. There is no files in the directories. When I run csum -h SHA1 /tmp/csum-test on AIX 6.1 host it gives me a different value then if I run csum -h SHA1 /tmp/csum-test under the AIX 7.1... (2 Replies)
Discussion started by: Devyn
2 Replies

3. UNIX for Dummies Questions & Answers

command to find cksum of all files inside a directory?

I did this: ls -lrRt | grep ^* | cksum * but it is showing cksum of sub-directories. Thanks You Please use code tags when posting data and code samples, thank you. (3 Replies)
Discussion started by: ezee
3 Replies

4. Solaris

Solaris 10 installation issue Error 25: Disk cannot be read - Solved

Hi all, I guess most of you have seen this error message while installing Solaris 10 on an x86 platform. I got the error message while installing from DVD ISO on my home VMWare ESXi server. It took me a long time to figure the exact issue and a subsequent solution. the solution is very... (1 Reply)
Discussion started by: admin_xor
1 Replies

5. UNIX for Advanced & Expert Users

cksum for all files in home directory

I know i can run cksum <filename> . However, how i can run cksum on all the files and directories in the $HOME ?? (SUNOS) (4 Replies)
Discussion started by: moe458
4 Replies

6. UNIX for Advanced & Expert Users

Cksum dependencies

Hi, On what factors does the cksum depend. If i build 2 machines exactly the same, then can i get the checksum of 2 compiled files same. Thanks (3 Replies)
Discussion started by: vibhor_agarwali
3 Replies

7. Shell Programming and Scripting

using cksum

hi, I am trying to use the cksum feature in unix. when i make a call to it i get returned something along the lines of: 4603435 14 file3 how do i get the first part of this response only; i.e: 4603435 I'm trying to use at a way without the use of sed and creating temp... (4 Replies)
Discussion started by: leeRoberts2007
4 Replies

8. Shell Programming and Scripting

The cksum Problem

Hi, I have a working script, well it works on my machine but when I try it on others the cksum section does not work properly (I know the scripting is not of a high quality but I'm just trying to get it working) Heres the script: #!/bin/sh case $# in 0) echo "usage: enshar filename... (7 Replies)
Discussion started by: Dim-Wit
7 Replies

9. Shell Programming and Scripting

cksum question

Hi there, I have a query about cksum. I'm running a script on the Unix box and in a script the cksum result differs from when I run it manually. As far as I can see the file is not being changed, is there any other times that the cksum would be different. (4 Replies)
Discussion started by: rjsha1
4 Replies

10. Shell Programming and Scripting

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 -... (5 Replies)
Discussion started by: kapolani
5 Replies
Login or Register to Ask a Question