Re: [Q] Delete file get "parameter too long"
From: Robert Miller (rmiller_at_SMUD.ORG)
Date: 04/27/04
- Previous message: Bill Verzal: "Re: [Q] Delete file get "parameter too long""
- Maybe in reply to: bbb bb: "[Q] Delete file get "parameter too long""
- Next in thread: cbaker_at_GOODYEAR.COM: "Re: [Q] Delete file get "parameter too long""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 27 Apr 2004 06:39:27 -0700 To: aix-l@Princeton.EDU
I have also recently used regular expressions - 'rm [a-f]*;rm [g-m]*;rm [n-z]*;rm [A-F]*', etc... which also works - I do like the for loop idea though, it's much easier :)
--rm
-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU]On Behalf Of
Harvey, Bruce T.
Sent: Tuesday, April 27, 2004 5:45 AM
To: aix-l@Princeton.EDU
Subject: Re: [Q] Delete file get "parameter too long"
1. Use the find command. But be absolutely certain either the directory
you specify or the directory you're in. This would als remove files in
lower directories, though, so be careful.
Ex: find /mydir -type f -name "*somepattern*" -exec rm -f {} \;
-print
2. List the files into a temporary file, create a 'for' loop or 'while
read' loop, then remove one at a time.
Ex: ls >/tmp/myfile
for f in `cat /tmp/myfile`
do
rm -f $f
done
-or-
cat /tmp/myfile | while read f
do
rm -f $f
done
Bruce T. Harvey
Legg Mason Wood Walker, Inc.
Corporate Technology - Mgr. UNIX Engineering
11155 Red Run Blvd - Owings Mills, MD 21117-3256
(410) 580-7383 -------- BTHarvey@LeggMason.com
-----------------------------------------------------------
-----Original Message-----
From: bbb bb [mailto:mccux1@HOTMAIL.COM]
Sent: Tuesday, April 27, 2004 8:29 AM
To: aix-l@Princeton.EDU
Subject: [Q] Delete file get "parameter too long"
We have AIX 4.3.3 on RS6000. I tried to delte files and get "parameter too
long". I need change to that directory to delete it.
Does anyone know why and how to fix it?
The procedures I do:
$ rm /user1/dir1/*
ksh: /usr/bin/rm: 0403-027 The parameter list is too long.
$ ls -al /user1/dir1/*|wc -l
ksh: /usr/bin/ls: 0403-027 The parameter list is too long.
0
$ cd /user1/dir1
$ ls -lt|wc -l
1042
$ rm *
$ ls -al
total 232
drwxrwxrwx 2 informix sys 22016 Apr 27 07:00 .
drwxrwsrwx 16 informix sys 90624 Apr 27 06:01 ..
Thanks.
_________________________________________________________________
Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage!
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/
direct/01/
IMPORTANT: The security of electronic mail sent through the Internet
is not guaranteed. Legg Mason therefore recommends that you do not
send confidential information to us via electronic mail, including social
security numbers, account numbers, and personal identification numbers.
Delivery, and timely delivery, of electronic mail is also not
guaranteed. Legg Mason therefore recommends that you do not send time-sensitive
or action-oriented messages to us via electronic mail, including
authorization to "buy" or "sell" a security or instructions to conduct any
other financial transaction. Such requests, orders or instructions will
not be processed until Legg Mason can confirm your instructions or
obtain appropriate written documentation where necessary.
- Previous message: Bill Verzal: "Re: [Q] Delete file get "parameter too long""
- Maybe in reply to: bbb bb: "[Q] Delete file get "parameter too long""
- Next in thread: cbaker_at_GOODYEAR.COM: "Re: [Q] Delete file get "parameter too long""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: for command
... Legg Mason Wood Walker, Inc. ... The security of electronic mail
sent through the Internet ... Such requests, orders or instructions will ... (AIX-L) - Re: question about hardware maintenance options
... My plan is to start with IBM and see what options we have there. ... few support
calls to IBM so it needs to be reviewed and justified. ... The security of electronic mail
sent through the Internet ... Legg Mason therefore recommends that you do not ...
(AIX-L) - Login Attempts are cumulative on su-only accounts
... We've noticed in our systems where a username is an 'su-only' username (for ...
The security of electronic mail sent through the Internet ... Legg Mason therefore
recommends that you do not ... Such requests, orders or instructions will ... (AIX-L) - Re: Replacing Failing SSA Disk
... Subject: Replacing Failing SSA Disk ... The security of electronic mail
sent through the Internet ... Legg Mason therefore recommends that you do not ...
Such requests, orders or instructions will ... (AIX-L) - Re: [Q] Delete file get "parameter too long"
... The security of electronic mail sent through the Internet ... Legg
Mason therefore recommends that you do not ... Such requests, orders or instructions
will ... (AIX-L)