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-03 00:38 +0900 (Wed), Stephen J. Turnbull wrote:

> ssh user@example.com 'cd public_html/cache && xargs rm < filelist'
> 
> should do the trick.  (The && is paranoia, just in case the cd fails
> and you have a similar files in your home directory for some reason.)

Don't count on this; cd returning an error code when it can't change to
the directory is actually a bashism, and most other Bourne-type shells
don't do this.

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