Mailing List Archive


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

Re: [tlug] deleting a local list of filenames from remote server



On 2008-12-05 12:22 +0900 (Fri), Edward Middleton wrote:

> If you understand what this does the problem will be obvious.
> 
> ssh user@example.com remote_command < pcache-update
>
> says run remote_command on user@example.com and send the contents of the
> file *pcache-update in your current local directory*....

Actually, to be more precise:

    some-command < foo > bar

says: open the file foo for reading, and truncate and open the file
bar for writing, and only once this has been done, start the command
some-command with the the foo file handle as stdin and the bar file
handle as stdout.

The shell to which you are typing this command will do all unquoted
redirections, expansion of * and ?, and so on before it runs the command
you've given it. So when you use a command such as ssh, that executes
things on a remote server, all of those things will use files and so on
from the local environment.

cjs
-- 
Curt Sampson       <cjs@example.com>        +81 90 7737 2974   
Mobile sites and software consulting: http://www.starling-software.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links