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 05, 2008 at 09:08:04AM +0900, Curt Sampson wrote:
> 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.

Say what?

    dagbrown@example.com:~$ uname -a
    SunOS prov01.unix 5.10 Generic_118844-26 i86pc i386 i86pc Solaris
    dagbrown@example.com:~$ /bin/sh
    $ cd /hoogleblats && echo honk
    /hoogleblats: does not exist
    $ ^D
    dagbrown@example.com:~$ /bin/ksh
    $ cd /hoogleblats && echo honk
    /bin/ksh: /hoogleblats:  not found
    $ ^D

--Dave (I could show you zsh too, but zsh is more bash than bash, so...)


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links