I am accessing a UNIX server via FTP. I want to retieve a file in a directory. What is the UNIX command that I need to view and retrieve files from a directory? (1 Reply)
Hi all, my directory structure is as follows /a/b/c.
I would like to tar the /a directory including the subdirectories b and c.
i intend to use the command tar -cvfz a.tgz a/ My question is where do i execute the command? do i execute it at the '/' prompt or at '/a' prompt ? My concern at... (1 Reply)
hello all.
i would like to be able to find the names of all files on a remote machine using ssh.
i only want the names of files, not directories
so far i'm stuck at "du -a | sort -n"
also, is it possible to write them to a file on my machine? i know how to write it to a file on that... (2 Replies)
Hello all,
Here's the deal...I have one directory with many subdirs and files.
What I want to find out is who is keeping old files and directories...say files and dirs that they didn't use since a number of n days, only one level under the initial dir. Output to a file.
A script for... (5 Replies)
Lets say i have files like the following format :-
R0001.log
R0002.log
...
...
R00011.log
upto R000n.log, there are also a lot of text files with different names
now how can i find these files with in a range, i can do "ls R000*.log" and it will show me all the R000*.log files but what... (2 Replies)
Alright so I've tried a couple different things that at first glance, looked like they worked.
find . -maxdepth 5 -type d -daystart -mtime 1 | xargs du -h Which seems to ignore the previous commands such as depth and modified time.
find .. -maxdepth 2 -type d -daystart -ctime 1 | xargs... (8 Replies)
I am using hp ux 11.31
Our SAN storage is being presented from an IBM XIV.
We have 3 HP servers (rx4640's), and the XIV has them setup in a cluster, so that when a disk is presented all 3 servers can see the new LUN.
I'm setting up a new VM on one of the HP servers. I have allocated a 34Gb... (1 Reply)
I have multiply directories scattered throughout my system that end in 2011.
Example:
one_2011
two_2011
three_2011
etc....
I'm trying to find all of these directories but coming up short.
I tried
find / -type d -name *2011 > example
Any suggestions? I already searched in the... (13 Replies)
I've a series of words in the format "abc0001d" till "abc1999d".
I would like to use delimiter to cut the word from abc0001s to two words:
abc00 and 01d. Help me in finding the correct delimiter to cut in desired way. (7 Replies)
Hi All,
I need your help in finding pattern of directories.
need to search for all pattern have "mypatern" from base directory folder.
example
-------
server1 - base directory
100 server1/ab_123456_1/mypattern
100 server1/ab_123456_2/mypattern
200 server1/ab_123457_1/mypattern... (13 Replies)
Discussion started by: lxdorney
13 Replies
LEARN ABOUT DEBIAN
io::async::protocol::stream
IO::Async::Protocol::Stream(3pm) User Contributed Perl Documentation IO::Async::Protocol::Stream(3pm)NAME
"IO::Async::Protocol::Stream" - base class for stream-based protocols
SYNOPSIS
Most likely this class will be subclassed to implement a particular network protocol.
package Net::Async::HelloWorld;
use strict;
use warnings;
use base qw( IO::Async::Protocol::Stream );
sub on_read
{
my $self = shift;
my ( $buffref, $eof ) = @_;
return 0 unless $$buffref =~ s/^(.*)
//;
my $line = $1;
if( $line =~ m/^HELLO (.*)/ ) {
my $name = $1;
$self->invoke_event( on_hello => $name );
}
return 1;
}
sub send_hello
{
my $self = shift;
my ( $name ) = @_;
$self->write( "HELLO $name
" );
}
This small example elides such details as error handling, which a real protocol implementation would be likely to contain.
DESCRIPTION
This subclass of IO::Async::Protocol is intended to stand as a base class for implementing stream-based protocols. It provides an interface
similar to IO::Async::Stream, primarily, a "write" method and an "on_read" event handler.
It contains an instance of an "IO::Async::Stream" object which it uses for actual communication, rather than being a subclass of it,
allowing a level of independence from the actual stream being used. For example, the stream may actually be an IO::Async::SSLStream to
allow the protocol to be used over SSL.
As with "IO::Async::Stream", it is required that by the time the protocol object is added to a Loop, that it either has an "on_read"
method, or has been configured with an "on_read" callback handler.
EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters:
$ret = on_read $buffer, $eof
The "on_read" handler is invoked identically to "IO::Async::Stream".
on_closed
The "on_closed" handler is optional, but if provided, will be invoked after the stream is closed by either side (either because the
"close()" method has been invoked on it, or on an incoming EOF).
PARAMETERS
The following named parameters may be passed to "new" or "configure":
on_read => CODE
CODE reference for the "on_read" event.
handle => IO
A shortcut for the common case where the transport only needs to be a plain "IO::Async::Stream" object. If this argument is
provided without a "transport" object, a new "IO::Async::Stream" object will be built around the given IO handle, and used as the
transport.
METHODS
$protocol->write( $data )
Writes the given data by calling the "write" method on the contained transport stream.
$protocol->connect( %args )
Sets up a connection to a peer, and configures the underlying "transport" for the Protocol. Calls "IO::Async::Protocol" "connect" with
"socktype" set to "stream".
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.14.2 2012-10-24 IO::Async::Protocol::Stream(3pm)