With grep's greedy regex matching its not easy to lay hands on the activity if its "name is after "/opt/rather/". There may be better solutions than these ones that rely on the input lines' structure. Try
or
or
A small awk script might be more apt to fulfill your needs to the full extent...
Hi,
I am confused about the output of find command.
Please see the two find commands below.
When i put "*.c" i get lots of files. But when i put *c only i get only one file.
Any answer??
$ find . -name "*c"
./clarify/cheval/hp_server/rulemanager/rulemansvc... (3 Replies)
when I do the find command from / , there are a lot of directories that I do not have access to and so I get
"find: cannot open ..."
How can I suppress these messages so only what was found is output.
I was thinking on
find / -name 'searchterm' | grep -v find
but this doesnt work
... (5 Replies)
I'm using the below command to list files older than 2 hours but it returns redundant output, am I missing something.
# find . -mmin +120 -exec ls -l {} \;
total 0
-rw-r--r-- 1 root system 0 Oct 13 09:52 test1
-rw-r--r-- 1 root system 0 Oct 13 09:52 test2
-rw-r--r-- 1 root ... (5 Replies)
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script.
I am planning to do like this:
if ; then... (2 Replies)
HI All,
Can anyone send me a command to find TOP 5 Memory consuming process.
It would be lelpful if I get output something like below
processname - pid - memory(in MB) - command
I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Hi all,
I found like top command could be used to find the Memory and CPU utilization. But i want to know how to find the Memory and CPU utilization for a particular user using top command.
Thanks in advance.
Thanks,
Ananthi.U (2 Replies)
Hi guys -
I am trying a small script to tell me if there is a file that exists less than 1k. It should report ERROR, otherwise the check is good.
I wrote this script down, however it never runs in the if/then statement. It always returns the echo ERROR.
MYSIZE=$(find /home/student/dir1... (8 Replies)
Hi All,
I wanted to show on stdout that a file was found right after it happens due to indicate the activity of long search. Further more I want to store the result of the find in a file.
I have tried this:
echo -n "Searching"
find . -name Makefile -type f -print -exec echo -n "." \; >... (16 Replies)
I wanted to know how to find the memory taken by a process using top command. The output of the top command is as follows as an example:
Mem: 13333364k total, 13238904k used, 94460k free, 623640k buffers
Swap: 25165816k total, 112k used, 25165704k free, 4572904k cached
PID USER ... (6 Replies)
Discussion started by: RHCE
6 Replies
LEARN ABOUT DEBIAN
test::memory::cycle
Cycle(3pm) User Contributed Perl Documentation Cycle(3pm)NAME
Test::Memory::Cycle - Check for memory leaks and circular memory references
VERSION
Version 1.04
SYNOPSIS
Perl's garbage collection has one big problem: Circular references can't get cleaned up. A circular reference can be as simple as two
reference that refer to each other:
my $mom = {
name => "Marilyn Lester",
};
my $me = {
name => "Andy Lester",
mother => $mom,
};
$mom->{son} = $me;
"Test::Memory::Cycle" is built on top of "Devel::Cycle" to give you an easy way to check for these circular references.
use Test::Memory::Cycle;
my $object = new MyObject;
# Do stuff with the object.
memory_cycle_ok( $object );
You can also use "memory_cycle_exists()" to make sure that you have a cycle where you expect to have one.
FUNCTIONS
"memory_cycle_ok( $reference, $msg )"
Checks that $reference doesn't have any circular memory references.
"memory_cycle_exists( $reference, $msg )"
Checks that $reference does have any circular memory references.
"weakened_memory_cycle_ok( $reference, $msg )"
Checks that $reference doesn't have any circular memory references, but unlike "memory_cycle_ok" this will also check for weakened cycles
produced with Scalar::Util's "weaken".
"weakened_memory_cycle_exists( $reference, $msg )"
Checks that $reference does have any circular memory references, but unlike "memory_cycle_exists" this will also check for weakened cycles
produced with Scalar::Util's "weaken".
AUTHOR
Written by Andy Lester, "<andy @ petdance.com>".
BUGS
Please report any bugs or feature requests to "bug-test-memory-cycle at rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Memory-Cycle>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Test::Memory::Cycle
You can also look for information at:
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Test-Memory-Cycle>
o CPAN Ratings
<http://cpanratings.perl.org/d/Test-Memory-Cycle>
o RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Memory-Cycle>
o Search CPAN
<http://search.cpan.org/dist/Test-Memory-Cycle>
ACKNOWLEDGEMENTS
Thanks to the contributions of Stevan Little, and to Lincoln Stein for writing Devel::Cycle.
COPYRIGHT
Copyright 2006, Andy Lester, All Rights Reserved.
You may use, modify, and distribute this package under the same terms as Perl itself.
perl v5.10.0 2006-08-07 Cycle(3pm)