12-14-2008
pid = fork();
if( pid == 0){
execl("/bin/sh","sh","/sbin/md5","filename",(char *)NULL);
_exit(127);
}
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I am kinda puzzled. When and Why do we use md5sum? I've read man pages for mp5sum, but didn't get anything out of it. Please, can someone explain this to me in couple of words.
Thank you all. (1 Reply)
Discussion started by: solvman
1 Replies
2. Programming
I tried using the following code to execute a program but it doesnt seems to be working .. I would like to know whats wrong wit it .
execve("/bin/cat", "words", NULL); (0 Replies)
Discussion started by: winsonlee
0 Replies
3. Programming
Hi everyone , after a pipe() system call i've forked and entred into the child process to execve a shell script .the problem here is that when the execve sys call fail , i want to send the error code (eg errno) to the parent process using the pipe writer side p , there is nothing received in the... (4 Replies)
Discussion started by: xtremejames183
4 Replies
4. Programming
Hi,
I'm writing a monitor program that can be notified once a process makes an execve system call and then stop that process for examining before it starts to run the new code. I know I can ptrace a process to achieve this, but I do not want to ptrace every process in the system. Is it possible?... (1 Reply)
Discussion started by: aaron.lwe
1 Replies
5. UNIX for Dummies Questions & Answers
Disclaimer: This is just a rainy day experiment. There is no expected "goal" other than to understand UNIX better.
After reading about fork and exec, my understanding is that forking, as the UNIX shell does by design, consequentially may sacrafice some speed versus an approach that runs in... (1 Reply)
Discussion started by: uiop44
1 Replies
6. Shell Programming and Scripting
something strange is that i find the md5sum command in different linux generate different result, for example, i have tried the same file in CentOS and Rhel, The md5 results are different, it is quite headache, who know the tricks? (3 Replies)
Discussion started by: zbc
3 Replies
7. Shell Programming and Scripting
Hello,
I need to download multiple files from an FTP server but occasionally they arrive in error so I need to perform an integrity check. I've been attempting to write a bash script that does the following:
Downloads all files including those in sub directories
Perform md5sum using... (4 Replies)
Discussion started by: shadyuk
4 Replies
8. Shell Programming and Scripting
Hi all,
I have to verify the integrity of a ISO image that is downloaded periodically on my PC. In order to do that, I've written a bash script that use the command md5sum with the aim to match the generated code with the default one created with the SIO image. The problem is that, if I start... (1 Reply)
Discussion started by: Mr. Piros
1 Replies
9. Programming
Hi,
I have the following scenario..
1) I have a binary which i launch from command line. It executes fine.
2) But when I launch it from another file using execve command, it gives a message that it is not able to access a shared object ".so" in /usr/bin (message is "Permission... (4 Replies)
Discussion started by: sathish1000
4 Replies
10. Shell Programming and Scripting
Hello,
First of all I want to apologize because i'm not a admin or coder and maybe all my efforts to write only this small script in my life would need one week full time reading man pages and forums but...
I don't have the money to offer me to get this time and the script I want to do seems... (5 Replies)
Discussion started by: toscan
5 Replies
MD5SUM(1) User Commands MD5SUM(1)
NAME
md5sum - compute and check MD5 message digest
SYNOPSIS
md5sum [OPTION]... [FILE]...
DESCRIPTION
Print or check MD5 (128-bit) checksums. With no FILE, or when FILE is -, read standard input.
-b, --binary
read in binary mode
-c, --check
read MD5 sums from the FILEs and check them
-t, --text
read in text mode (default)
The following three options are useful only when verifying checksums:
--quiet
don't print OK for each successfully verified file
--status
don't output anything, status code shows success
-w, --warn
warn about improperly formatted checksum lines
--help display this help and exit
--version
output version information and exit
The sums are computed as described in RFC 1321. 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), and name for each FILE.
AUTHOR
Written by Ulrich Drepper, Scott Miller, and David Madore.
REPORTING BUGS
Report md5sum bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
COPYRIGHT
Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
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 md5sum is maintained as a Texinfo manual. If the info and md5sum programs are properly installed at your site,
the command
info coreutils 'md5sum invocation'
should give you access to the complete manual.
GNU coreutils 7.1 July 2010 MD5SUM(1)