Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Getting information about a remote file via SSH: how to escape the filename

by salva (Canon)
on Jun 27, 2013 at 12:24 UTC ( #1041003=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Net::OpenSSH;
    
    ...
    $ssh->die_on_error("unable to connect to remote host");
    
    my ($out, $err) = $ssh->capture2(ls => '-l', $remotefile);
    
  2. or download this
    use Net::SFTP::Foreign;
    use Data::Dumper;
    ...
    
    my $attr = $sftp->stat($remotefile);
    print Dumper $attr;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1041003]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-03-30 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?