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 Fri, Dec 5, 2008 at 10:56, Charles Muller
<cmuller-lst@example.com> wrote:
> I swear this worked two days ago when I first tried it. I didn't get any error
> messages and the files were indeed deleted.
>
>    scp  /dicts/ddb/pcache-update user@example.com:public_html/ddb/pcache/pcache-update;
>
>    ssh user@example.com 'cd public_html/ddb/pcache && xargs rm'  < pcache-update;
>
> Now when I run it, the file obviously get copied to the server, in the
> proper directory, but for some reason, the file is not found
>
>   chuck@example.com:~/bin$ pcache_update_ddb
>   pcache-update                                 100% 2257     2.2KB/s   00:00
>
>   /home/chuck/bin/pcache_update_ddb: line 5: pcache-update: No such file or directory
>
>   chuck@example.com:~/bin$

because you pass the file outside the ''. You have to put the whole
command, including the '<' part into the quotes

ssh user@example.com 'cd public_html/ddb/pcache && xargs rm  < pcache-update';

-- 
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