From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,447095e7d4312dd6 X-Google-Attributes: gidfee84,public From: Marek Pola Subject: Re: removing specific directoryies Date: 1997/05/02 Message-ID: <3369B9DD.F999A371@mailbox.swipnet.se>#1/1 X-Deja-AN: 238852789 References: <33679957.6895@worldnet.att.net> To: Greg Green X-Priority: 3 (Normal) Organization: - Newsgroups: comp.unix.osf.osf1 NNTP-Posting-User: s-14094 Greg Green wrote: > > I need to remove specific directories from a particular subdirectory. I > tried using the command rm -rfi filename* and I was prompted with: > > bash: /sbin/rm: Arg list too long > > Is there a way around this? Is there a way to increase the size for > this list even temporarily? Must I delete one directory at a time until > I get the list small enough? You can do it in three ways: 1. If you want to delete all subdirs, go up one level and to rm -r topdir. 2. Delete smaller number of directories at a time. I often manually have to do "rm -r a*", "rm -r b*" etc. 3. Use find: "find . -name "filename*" -type d -exec rm -r {} \;". Good luck. /Marek