10-22-2009
Ok, that's new! I'll check it out. Thanks though!
Here's another one, if you don't mind: I logged in as a normal user "ABC" then I did "su" to root. I tried to kill the pid of the user by saying "kill -9 pid-of-ABC" Instead, everything is being killed and I'm going back to the login. Am I killing the entire shell here? How do I avoid that and let the "root" stay logged in??
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi! Suppose I have a directory (no symbolic links) called /WORK that contains 3 subdirectories:
/A
/B
/C
My problem is this: I want to look for a file that contains an order number. So far, I obtain what I want by doing this
/home/acb% cd /WORK/A
/home/acb/WORK/A% grep '093023553' *.*... (3 Replies)
Discussion started by: alan
3 Replies
2. Programming
Hi everyone, i need your input on this. We can express a function recursivly like this
A(n) = (2 n = 0
5 n = 1
A(n − 1) + A(n − 2) % 47 n > 1
How would i go about constructing a recursive function for this?... (1 Reply)
Discussion started by: bebop1111116
1 Replies
3. HP-UX
Hi,
I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory.
Thanks in advance.
Mike (3 Replies)
Discussion started by: Mike1234
3 Replies
4. Cybersecurity
Hello,
I need to transfer files from Serve1 to Server2. Previously I was using scp command. Now I have to use sftp (due to audit issues). The problem with sftp is (atleast to my level of knowledge) we cannot transfer dirs (and files within that dir).
Is there a way to solve this? Looks like... (1 Reply)
Discussion started by: MohanTJ
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a problem with concatenation text files.
I have a directory, say 'foo'
Inside this folder, I have many sub folders, say 'oof1, oof2 .... oof20'
Each oof directory has a number of text files inside it. I need to
concatenate all the text files in oof directories within foo...... (1 Reply)
Discussion started by: Kerensa@unsw.ed
1 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I need to count the number of lines in all the files under a directory (several levels deep). I am feeling extremely dumb, but I don't know how to do that. Needless to say, I am not a shell script wiz... Any advice?
thanks in advance! (13 Replies)
Discussion started by: bimba17
13 Replies
7. Shell Programming and Scripting
How can I recursively list file permission including all subdirectories and save the result to a file. I also want to exclude certain file type. All I need is the UID and GID of each of the files. (1 Reply)
Discussion started by: kelseyh
1 Replies
8. Shell Programming and Scripting
How can I recursively list file permission including all subdirectories and save the result to a file. I also want to exclude certain file type such as *.log.
All I need is the UID and GID of each of the files/folders output to a text file.
Any ideas, any help very much apperciated. (1 Reply)
Discussion started by: kelseyh
1 Replies
9. Shell Programming and Scripting
Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies
10. Shell Programming and Scripting
Hi,
I need help with recursive function. This is not a part of any homework or classroom related. I am trying to learn unix and working on a question posted on site. basically i have to create a script which does what rm -r does.
my code so far:
1 #!/bin/bash
2
3 function recursive... (2 Replies)
Discussion started by: bluebird13
2 Replies
LEARN ABOUT DEBIAN
explain_kill_or_die
explain_kill_or_die(3) Library Functions Manual explain_kill_or_die(3)
NAME
explain_kill_or_die - send signal to a process and report errors
SYNOPSIS
#include <libexplain/kill.h>
void explain_kill_or_die(pid_t pid, int sig);
int explain_kill_on_error(pid_t pid, int sig);
DESCRIPTION
The explain_kill_or_die function is used to call the kill(2) system call. On failure an explanation will be printed to stderr, obtained
from the explain_kill(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
The explain_kill_on_error function is used to call the kill(2) system call. On failure an explanation will be printed to stderr, obtained
from the explain_kill(3) function, but still returns to the caller.
pid The pid, exactly as to be passed to the kill(2) system call.
sig The sig, exactly as to be passed to the kill(2) system call.
RETURN VALUE
The explain_kill_or_die function only returns on success, see kill(2) for more information. On failure, prints an explanation and exits, it
does not return.
The explain_kill_on_error function always returns the value return by the wrapped kill(2) system call.
EXAMPLE
The explain_kill_or_die function is intended to be used in a fashion similar to the following example:
explain_kill_or_die(pid, sig);
SEE ALSO
kill(2) send signal to a process
explain_kill(3)
explain kill(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2009 Peter Miller
explain_kill_or_die(3)