Re: List contents of file on remote server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2004-09-16 at 21:32, Ben Halicki wrote:
> Hi all,
>  
> Anyone know a quick and easy way to list the contents of a file on a
> remote machine?  Similar to the cat command, but the file is sitting
> on another server.  I was thinking about using scp to copy the file to
> the local machine first, then using cat, but thought there might be a
> way of performing this in one step?
>  
> Thanks in advance,
>  
How about this:

ssh computernameorIP 'cat /etc/hosts'

Replace compternameorIP with the name of the machine you want to
access.  You can execute what ever you want in the command portion, in
this case I just cat'ed the /etc/hosts file on the remote machine.

-- 
Scot L. Harris
webid@xxxxxxxxxx

Usage: fortune -P [-f] -a [xsz] Q: file [rKe9] -v6[+] file1 ... 



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux