05-22-2007
Finding The Number Of Programs That A Given User Running On A TERMINAL
How To Find The Number Of Programs That A User Running ON A GIVEN TERMINAL
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Im using the knoppix version of linux, which is booting straight off the cd, and it shows my c drive (partiton) that has all my programs i have installed in my xp operating system. Im wondering if theres a way i can play my games like lotr return of the king, or jedi academy, in knoppox. it shows... (2 Replies)
Discussion started by: jestra
2 Replies
2. UNIX for Dummies Questions & Answers
Hey folks, i'm a total newbie at linux (only installed it yesterday) so don't be mad at me for querying this. I downloaded firefox, and unpacked the library files and binaries into /usr/lib/firefox. Now, am I correct in thinking that to run it, I need to enter the 'sh /usr/lib/firefox' command into... (4 Replies)
Discussion started by: shep
4 Replies
3. UNIX for Advanced & Expert Users
Hello,
I would like to run gedit as root while logged into my regular user account. When I try to launch gedit from the command line as super user, I get this message:
Gtk-WARNING **: cannot open display:
Any suggestions or word arounds? It would make my life a lot simpler to edit files... (8 Replies)
Discussion started by: Allasso
8 Replies
4. Shell Programming and Scripting
I am trying to run a program called GMT using perl. Cannot make to run. I have tried using exec("date"); as a test but when I use exec($try); nothing happens.
#!/usr/bin/perl
print "$#ARGV\n";
if ($#ARGV != 3) {
print "usage: jcdplot.perl\n";
exit;
}
$h = $ARGV;... (1 Reply)
Discussion started by: kristinu
1 Replies
5. Shell Programming and Scripting
I have installed a software called GMT, then writing a script that call the new programs
./example02.sh
but I am getting
./example02.sh: line 20: gmtset: command not found
I have done
./configure
make
make install (0 Replies)
Discussion started by: kristinu
0 Replies
6. Programming
Any idea how I can run a program from a phyton script?
For example, in csh I will do
$tpath/tsimplex base=$fbase data=$fdata restore=$frestore \
nxp=$nx nzp=$nz param=$param intp=$intp nlay=$nlay \
varp=$varp sigma0=$sigma maxiter=$maxiter tol=$tol \
... (2 Replies)
Discussion started by: kristinu
2 Replies
7. UNIX for Dummies Questions & Answers
Ok, so I know there's a way to do this, but I've been trying to find out all afternoon with no luck. I think it should print out something like this:
1 bin
2 daemon
6 duo
Where the numbers on the left are the number of processes being run by the user whose name is listed on the right. Is... (4 Replies)
Discussion started by: Duo11
4 Replies
8. UNIX for Advanced & Expert Users
Hi all,
Recently I came across a challenge of finding the user accounts lying around on servers and not being used so much. Our client has hundreds of AIX, RedHat, and Solaris servers.
For AIX, I have made a script which uses lsuser and a little bit of sed and awk to show the user accounts... (7 Replies)
Discussion started by: admin_xor
7 Replies
9. Shell Programming and Scripting
Hi All,
I have a list of data in the listing file and I run row by row to process the record, but how to identify what is the current process line number ?
Thanks. (2 Replies)
Discussion started by: ckwan
2 Replies
10. UNIX for Dummies Questions & Answers
Hey guys,
Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries.
However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies
LEARN ABOUT OSX
file::find::rule::extending
File::Find::Rule::Extending(3) User Contributed Perl Documentation File::Find::Rule::Extending(3)
NAME
File::Find::Rule::Extending - the mini-guide to extending File::Find::Rule
SYNOPSIS
package File::Find::Rule::Random;
use strict;
# take useful things from File::Find::Rule
use base 'File::Find::Rule';
# and force our crack into the main namespace
sub File::Find::Rule::random () {
my $self = shift()->_force_object;
$self->exec( sub { rand > 0.5 } );
}
1;
DESCRIPTION
File::Find::Rule went down so well with the buying public that everyone wanted to add extra features. With the 0.07 release this became a
possibility, using the following conventions.
Declare your package
package File::Find::Rule::Random;
use strict;
Inherit methods from File::Find::Rule
# take useful things from File::Find::Rule
use base 'File::Find::Rule';
Force your madness into the main package
# and force our crack into the main namespace
sub File::Find::Rule::random () {
my $self = shift()->_force_object;
$self->exec( sub { rand > 0.5 } );
}
Yes, we're being very cavalier here and defining things into the main File::Find::Rule namespace. This is due to lack of imaginiation on
my part - I simply can't find a way for the functional and oo interface to work without doing this or some kind of inheritance, and
inheritance stops you using two File::Find::Rule::Foo modules together.
For this reason try and pick distinct names for your extensions. If this becomes a problem then I may institute a semi-official registry
of taken names.
Taking no arguments.
Note the null prototype on random. This is a cheat for the procedural interface to know that your sub takes no arguments, and so allows
this to happen:
find( random => in => '.' );
If you hadn't declared "random" with a null prototype it would have consumed "in" as a parameter to it, then got all confused as it doesn't
know about a '.' rule.
AUTHOR
Richard Clamp <richardc@unixbeard.net>
COPYRIGHT
Copyright (C) 2002 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
File::Find::Rule
File::Find::Rule::MMagic was the first extension module, so maybe check that out.
perl v5.16.2 2011-09-19 File::Find::Rule::Extending(3)