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 Thu, Dec 4, 2008 at 00:29, Daniel A. Ramaley
<daniel.ramaley@example.com> wrote:
> On Tuesday December 2 2008 19:12, Clemens Schwaighofer wrote:
>>I do this in one of my scripts
>>
>>scp $delete_list target_user@example.com:~;
>>ssh -f target_user@example.com "cat ~/$delete_list_file | xargs rm -fv"
>
> Are $delete_list and $delete_list_file the same? From your usage, i'm
> going to assume they are, but if not, then please disregard everything
> else i say below.
>
<snip>
>
> $some_program | ssh -f target_user@example.com 'xargs rm -fv'

wow, thanks. I have no idea why I never thought about that, and I
really don't know. But I think I had some troubles and wrong usage of
the file list for the xargs command. I never thought to pipe it "into"
ssh. Removing one command is always good.

I can't directly pipe it from a command, as this file list is somehow
generated from a flow of different command.

but thanks anyway

-- 
Clemens Schwaighofer
gullevek@example.com / gullevek@example.com
http://www.flickr.com/photos/gullevek/


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links