Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by salva (Abbot)
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
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 rifling through the Monastery: (4)
As of 2020-08-04 03:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (31 votes). Check out past polls.

    Notices?