cksum for all files in home directory


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users cksum for all files in home directory
# 1  
Old 09-29-2010
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)
# 2  
Old 09-29-2010
Wecome to the 'find' command.
Code:
find $HOME -exec cksum '{}' ';'

# 3  
Old 09-29-2010
cksum does not apply to directories.

Code:
cksum *

will run on all files in the current directory.
# 4  
Old 09-29-2010
In that case:

Code:
find $HOME -type f -exec cksum '{}' ';'

# 5  
Old 09-29-2010
got the baby going..lol..
ran it from the home drive..and bam
Code:
find . \! -type p -exec cksum {} \; >> check.out


Last edited by Scott; 09-29-2010 at 07:05 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove empty files in home directory

how to remove empty files tried below command its remove only zero bytes not empty file which is greater then zero byte. for x in * do if then rm $x fi done (8 Replies)
Discussion started by: Kalia
8 Replies

2. Solaris

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... # cksum ravi(directory) 3454912345 0... (3 Replies)
Discussion started by: Navkreddy
3 Replies

3. 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

4. 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

5. Shell Programming and Scripting

users who have un-sanctioned(forbidden) files in their home directory.

Hello guys, I have to create a sh script which return users who have un-sanctioned(forbidden) files in their home directory. I tried to do: #!/bin/sh -x SHADOW_FILE="/etc/shadow" PASSWORD_FILE="/etc/passwd" for i in `grep -v '^+' $PASSWORD_FILE | cut -d: -f1,6` do username=`echo... (6 Replies)
Discussion started by: catalint
6 Replies

6. Shell Programming and Scripting

help with removing files from home directory

hey there folks! I cant figure out, for the life of me, how to procede in removing alll the files in my home directory that are not owned by me. would i have to list them, but after that what do i do. or is there some way I am not aware of. my employer heard i could script in unix, but i havent... (3 Replies)
Discussion started by: Ginkosu
3 Replies

7. Solaris

Newbie questions about HOME directory files

Hi, I am newbie to Solaris and system administration in general, and I have a couple of questions about files in my HOME directory. When I perform ls -la, I get the following list of files: drwxr-xr-x 7 XXXYYY staff 17 Aug 24 07:31 . drwxr-xr-x 7 root root 7... (2 Replies)
Discussion started by: JVerstry
2 Replies

8. Shell Programming and Scripting

Find recently updated files in home directory

Is there a shell command that will allow me to list index files in the /home directory for all users on a server that have been updated within the past 24 hours? (e.g. index.htm .html .php in/home/user1/public_html /home/user2/public_html /home/user3/public_html etc ) (2 Replies)
Discussion started by: Kain
2 Replies

9. Cybersecurity

Strange files keep appearing in my home directory

Hi everyone, really strange files keep appearing in my home directory. I have absolutely no idea where they come from and I'm a little concerned that they could come from some kind of malware activity or Firefox exploit. I searched Google for parts of the file names but without a result. The... (6 Replies)
Discussion started by: schallstrom
6 Replies
Login or Register to Ask a Question