* removing specific directoryies
@ 1997-04-30 4:00 Greg Green
1997-05-02 4:00 ` Marek Pola
[not found] ` <34751F8B.41C6@tesla.optus.com.au>
0 siblings, 2 replies; 4+ messages in thread
From: Greg Green @ 1997-04-30 4:00 UTC (permalink / raw)
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?
Thanks,
-Greg Green (ggreen.afis@worldnet.att.net)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: removing specific directoryies
1997-04-30 4:00 removing specific directoryies Greg Green
@ 1997-05-02 4:00 ` Marek Pola
[not found] ` <34751F8B.41C6@tesla.optus.com.au>
1 sibling, 0 replies; 4+ messages in thread
From: Marek Pola @ 1997-05-02 4:00 UTC (permalink / raw)
To: Greg Green
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: removing specific directoryies
[not found] ` <34751F8B.41C6@tesla.optus.com.au>
@ 1997-11-21 5:00 ` Andrew Duane USG/PE
1997-11-21 5:00 ` Darron Shaffer
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Duane USG/PE @ 1997-11-21 5:00 UTC (permalink / raw)
In article <34751F8B.41C6@tesla.optus.com.au> Jarra Voleynik <tsg_jxv@tesla.optus.com.au> writes:
>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 cannot increase the arg list size at all.
You can do [a-m]*, then [n-z]*, or whatever, to break the list
up into two or three pieces; no need to resort to one at a time.
--
Andrew L. Duane (JOT-7) duane@zk3.dec.com
Digital Equipment Corporation (603)-884-1294
110 Spit Brook Road
M/S ZKO3-3/U14
Nashua, NH 03062-2698
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: removing specific directoryies
1997-11-21 5:00 ` Andrew Duane USG/PE
@ 1997-11-21 5:00 ` Darron Shaffer
0 siblings, 0 replies; 4+ messages in thread
From: Darron Shaffer @ 1997-11-21 5:00 UTC (permalink / raw)
--Multipart_Fri_Nov_21_14:30:50_1997-1
Content-Type: text/plain; charset=US-ASCII
duane@hunch.zk3.dec.com (Andrew Duane USG/PE) writes:
> In article <34751F8B.41C6@tesla.optus.com.au> Jarra Voleynik
> <tsg_jxv@tesla.optus.com.au> writes:
> >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 cannot increase the arg list size at all.
>
> You can do [a-m]*, then [n-z]*, or whatever, to break the list
> up into two or three pieces; no need to resort to one at a time.
>
The standard solution to problems of this type is the 'xargs' utility.
ls filename* | xargs rm -rfi
Good luck,
Darron
--Multipart_Fri_Nov_21_14:30:50_1997-1
Content-Type: text/plain; charset=US-ASCII
__ __ _
_ ) ___ _\
__) __ \ Enterprise Middleware Solutions Darron J. Shaffer
BEA Systems Inc. Sr. Software Engineer
17101 Preston Rd darron.shaffer@beasys.com
LB# 115, Ste 260 Voice: (972) 738-6137
Dallas, TX 75248 Fax: (972) 738-6111
http://www.beasys.com
--Multipart_Fri_Nov_21_14:30:50_1997-1--
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1997-11-21 5:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-04-30 4:00 removing specific directoryies Greg Green
1997-05-02 4:00 ` Marek Pola
[not found] ` <34751F8B.41C6@tesla.optus.com.au>
1997-11-21 5:00 ` Andrew Duane USG/PE
1997-11-21 5:00 ` Darron Shaffer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox