Mailing List Archive


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

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



I have a file list that lists the dictionary files that I've updated locally. Once every few days, I delete the corresponding files from the dictionary cache on my web server, so that new cache files will be generated. For a few years now, I've been manually logging on to the site with FTP, going to the cache directory, typing "rm" and pasting in the list of filenames.

Now that I'm learning a few things with SSH, I'm wondering if I can't automate this. I've succeeded in doing it locally with this sort of command

  xargs rm < filelist

Wherein the files in filelist have absolute paths. The file list, without the absolute paths, looks something like this:

4eid(b4e00-4e00-6bdb-751f).html
4eid(b4e00-4e00).html
4eid(b4e00-4e08-516d-50cf).html
4eid(b4e00-4e09-6627).html

 etc.

I am thinking that I need to do something that is (logically, at least) like this:

ssh user@example.com 'xargs rm < filelist public_html/cache/'

I know that this is not close at all, but I have spent the evening reading man pages and Googling around for something equivalent, and so far have not been able to come up with something close. I assume that what I want to do is possible. Is it?

Thanks,

Chuck

--
-------------------

A. Charles Muller

University of Tokyo
Graduate School of Humanities and Sociology, Faculty of Letters
Center for Evolving Humanities
7-3-1 Hongo, Bunkyo-ku
Tokyo 113-0033, Japan

Web Site: Resources for East Asian Language and Thought
http://www.acmuller.net

<acmuller[at]jj.em-net.ne.jp>

Mobile Phone: 090-9310-1787




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links