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

Re: is there a way to use find and rm together?



for bash, you mey use command subtitution:

rm -i $(find /home/ftpusers -name .bash*)

san
--- Martin Würtele <martin@wuertele.cc> wrote:
> hi,
> 
> we have ftp users in home/ftpusers and we disabled
> shell acces for them.
> now we have .bash* files in every user directory
> under /home/ftpusers.
> 
> is there a way to use something like 
> find /home/ftpusers -name .bash* | rm
> unfortunately this was what i hoped that could work
> but i only get 
> rm: too few arguments.
> 
> i think this is because rm gets every file followed
> by newline from find.
> so if i use 
> find -name .bash* -print0
> i get the list without newlines but if i use
> find -name .bash* -print0 | ls 
> i get the contents of the current directory.
> 
> any ideas how to solve this problem?
> 
> tia martin
> -- 
> 30DC 1D28 1D79 32F5 5E67  3ABB 28EE B35A 3E8D CCC0
> 
> 
> -- 
> To UNSUBSCRIBE, email to
> debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org
> 
> 
> 


=====
ÊҸت¹äÁè¾Ö§ÅÐàÁÔ´ÊÔ·¸ÔºÑµÃáÅзÃѾÂìÊÔ¹·Ò§»Ñ­­Ò µÃÒºà·èÒ·Õè·Øê¹äÁè¼Ù¡¢Ò´
¹Ô¸Ô àÍÕÂÇÈÃÕǧÈì

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/



Reply to: