:59
To: Multiple recipients of list ORACLE-L
Subject: arg list too long in unix
Hi all,
OS: SOlaris 2.8
DB: 8i
In the clean up process of the following files, I am
trying to list out the files that start with cz.
cz-session-returnui177_11Jan02_0959AM_33509.txt
cz-session
-- kommareddy sreenivasa [EMAIL PROTECTED]
Hi all,
Is there something like,
unix is unable to use commands like ls -ltr (sort etc)
when there are huge number of files in a directory(may
be thousands/millions).
If yes, what is the limit and how to know it on sun
solaris 2.8.
This is
The size of the buffer used to store parameters is actually
configurable in most Unix versions I've had a look at.
Somewhere around 4K, from memory. Would be very surprised
if it wasn't configurable in Solaris. Would also be very
surprised if you find one techo at Sun that knows how to
Hi all,
OS: SOlaris 2.8
DB: 8i
In the clean up process of the following files, I am
trying to list out the files that start with cz.
cz-session-returnui177_11Jan02_0959AM_33509.txt
cz-session-Applet178_11Jan02_0959AM_34108.txt
cz-session-returnui175_11Jan02_0959AM_20504.txt
Use the xargs command.
Read about it in the man pages.
Or use find, but that is more complex.
Cheers
Nuno Souto
[EMAIL PROTECTED]
- Original Message -
OS: SOlaris 2.8
DB: 8i
In the clean up process of the following files, I am
trying to list out the files that start with cz.
kommareddy sreenivasa wrote:
Hi all,
OS: SOlaris 2.8
DB: 8i
In the clean up process of the following files, I am
trying to list out the files that start with cz.
cz-session-returnui177_11Jan02_0959AM_33509.txt
cz-session-Applet178_11Jan02_0959AM_34108.txt
: kommareddy sreenivasa [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 29. August 2002 12:59
An: Multiple recipients of list ORACLE-L
Betreff: arg list too long in unix
Hi all,
OS: SOlaris 2.8
DB: 8i
In the clean up process of the following files, I am
trying to list out the files that start
how about;
$ find . -name 'cz*' -print | xargs ls -lt
or
$ find . -name 'cz*' -print | xargs rm
-Original Message-
From: kommareddy sreenivasa [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 29, 2002 6:59 AM
To: Multiple recipients of list ORACLE-L
Subject: arg list too long
I'm not sure xargs will work -- it seems to me that since xargs is
typically invoked as: 'ls cz* | xargs rm', Nuno is likely to get the same
arg list too long error. I think the best way to delete the files would
be: 'find . -name cz\* -exec rm -f {} \;'
-- Philip
- Original Message -
Title: RE: arg list too long in unix
go into the top dir and run
find . -name cz-session-* | xargs rm -f
or
find . -name cz-session-* -exec rm -f {} \;
the first runs faster but keep in mind that
in other scenarios xargs splits stdin into
file names on space and newline
I cant list them using ls -ltr *session* as this
string may change. I have to identify the files that
srart with cz only.
can somebody through somelight on this.
man xargs;
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL
-- Philip Douglass [EMAIL PROTECTED]
I'm not sure xargs will work -- it seems to me that since xargs is
typically invoked as: 'ls cz* | xargs rm', Nuno is likely to get the same
arg list too long error. I think the best way to delete the files would
be: 'find . -name cz\* -exec rm -f {}
-- Markham, Richard [EMAIL PROTECTED]
find . -name cz-session-* | xargs rm -f
This will handle files in 8K chunks; find .. -e will fork
for each file. Net result is that xargs is a much better
way to go. On a multi-cpu system you can also use xargs -P
to run jobs in parallel (at the expense
Quite true, but ironically enough, the xargs manpage (on my system as well
as many others) only has examples using ls to feed xargs. I meant to end
the exec param with \+ instead of \; which aggregates a set to operate on.
I'm not clear on whether that means one giant set, or several smaller
Might take awhile to fork 70k+ shells.
I don't know of any good reason to ever use -exec.
If the arg list is too long, one way to shorten it is with 'head'.
find /dir_2_clean -name cz* -print | head -1000 | xargs rm -f
Just run that til the files are all gone.
Jared
On Thursday 29
If the arg list is too long, one way to shorten it is with 'head'.
find /dir_2_clean -name cz* -print | head -1000 | xargs rm -f
The whole point of xargs is that it doesn't get overlong
arguments -- unless one of the file paths is 4KB by itself.
This leaves the head extraneous:
ls -1 cz* /tmp/1.1
vi /tmp/1.1
:1,$ s/^/rm -f /
ZZ
/tmp/1.1
joe
Philip Douglass wrote:
I'm not sure xargs will work -- it seems to me that since xargs is
typically invoked as: 'ls cz* | xargs rm', Nuno is likely to get the same
arg list too long error. I think the best way to delete the
17 matches
Mail list logo