RE: arg list too long in unix

2002-08-30 Thread kommareddy sreenivasa

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.

thnx and regards,
srinivas

--- Lakhani, Vipul [EMAIL PROTECTED] wrote:
 maybe use find (check the syntax of below) 
 (just guessing)
 
 eg find . -name '*' -exec rm {} \; 
 
 readt this : 
 
 http://www.linuxjournal.com/article.php?sid=6060
 
 
 -Original Message-
 From: kommareddy sreenivasa
 [mailto:[EMAIL PROTECTED]]
 Sent: 29 August 2002 11: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-Applet178_11Jan02_0959AM_34108.txt
  cz-session-returnui175_11Jan02_0959AM_20504.txt
  cz-session-DHTML176_11Jan02_0959AM_22335.txt
  cz-session-returnui179_11Jan02_1000AM_34566.txt
  cz-session-Applet180_11Jan02_1000AM_34818.txt
  cz-session-BatchSingle181_11Jan02_1001AM_07757.txt
  cz-session-BatchSingle182_11Jan02_1001AM_11687.txt
  cz-session-BatchSingle183_11Jan02_1001AM_14010.txt
  cz-session-BatchSingle184_11Jan02_1001AM_17708.txt
  cz-session-BatchSingle185_11Jan02_1001AM_20029.txt
 
 but when I issue ls -ltr cz* , I am getting arg list
 too long error. I 70,000-80,000 files that needs to
 be
 removed from the directory.
 
 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.
 
 thanx in advance,
 srinivas
 
 __
 Do You Yahoo!?
 Yahoo! Finance - Get real-time stock quotes
 http://finance.yahoo.com
 -- 
 Please see the official ORACLE-L FAQ:
 http://www.orafaq.com
 -- 
 Author: kommareddy sreenivasa
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX:
 (858) 538-5051
 San Diego, California-- Public Internet
 access / Mailing Lists


 To REMOVE yourself from this mailing list, send an
 E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of
 'ListGuru') and in
 the message BODY, include a line containing: UNSUB
 ORACLE-L
 (or the name of mailing list you want to be removed
 from).  You may
 also send the HELP command for other information
 (like subscribing).


__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: kommareddy sreenivasa
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: arg list too long in unix

2002-08-30 Thread Steven Lembark



-- 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 not an issue with the command, but the buffer used
by the O/S to store the comman line arguments. Standard
sizes are 4KB or 8KB (i.e., on page). If the command line
arg's exceed this size then the command cannot be started.

Classic case is a directory with too many files in it;
ls may work fine but ls * will blow up because the
shell's expanding * overflows the buffer.

If the file names are 500 char's long then you may have
problems with only 10 files in the directory [don't
laugh, I've seen it].

ls is partcularly bad about dealing with over-populated
dir's becuse it sorts the result, which can be expensive
in a 10 000 file diredtory; find does not sort anything
and is better suited to dealing with huge file lists.

--
Steven Lembark   2930 W. Palmer
Workhorse Computing   Chicago, IL 60647
+1 800 762 1582
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Steven Lembark
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-30 Thread Nuno Souto

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 
change it.  It's actually one of the configurable kernel 
parameters, but you got to edit it directly.  Last time 
I did this was 6 years ago, so don't even dream of asking 
me to remember the details.  I've got enough trouble trying
to remember what I had for breakfast today!

Dig into the man pages, have a look at xargs command and 
follow the links from there.  That's how I came across 
this.  info(2) is also useful.

Cheers
Nuno Souto
[EMAIL PROTECTED]

- Original Message - 
 
 If yes, what is the limit and how to know it on sun
 solaris 2.8.
 


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Nuno Souto
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-29 Thread Nuno Souto

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.
 
  cz-session-returnui177_11Jan02_0959AM_33509.txt
  cz-session-Applet178_11Jan02_0959AM_34108.txt
  cz-session-returnui175_11Jan02_0959AM_20504.txt
  cz-session-DHTML176_11Jan02_0959AM_22335.txt
  cz-session-returnui179_11Jan02_1000AM_34566.txt
  cz-session-Applet180_11Jan02_1000AM_34818.txt
  cz-session-BatchSingle181_11Jan02_1001AM_07757.txt
  cz-session-BatchSingle182_11Jan02_1001AM_11687.txt
  cz-session-BatchSingle183_11Jan02_1001AM_14010.txt
  cz-session-BatchSingle184_11Jan02_1001AM_17708.txt
  cz-session-BatchSingle185_11Jan02_1001AM_20029.txt
 
 but when I issue ls -ltr cz* , I am getting arg list
 too long error. I 70,000-80,000 files that needs to be
 removed from the directory.
 
 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.


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Nuno Souto
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-29 Thread Stephane Faroult

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
  cz-session-returnui175_11Jan02_0959AM_20504.txt
  cz-session-DHTML176_11Jan02_0959AM_22335.txt
  cz-session-returnui179_11Jan02_1000AM_34566.txt
  cz-session-Applet180_11Jan02_1000AM_34818.txt
  cz-session-BatchSingle181_11Jan02_1001AM_07757.txt
  cz-session-BatchSingle182_11Jan02_1001AM_11687.txt
  cz-session-BatchSingle183_11Jan02_1001AM_14010.txt
  cz-session-BatchSingle184_11Jan02_1001AM_17708.txt
  cz-session-BatchSingle185_11Jan02_1001AM_20029.txt
 
 but when I issue ls -ltr cz* , I am getting arg list
 too long error. I 70,000-80,000 files that needs to be
 removed from the directory.
 
 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.
 
 thanx in advance,
 srinivas
 

Srinivas,

If you are using the Bourne shell try issuing the same command under
ksh.

HTH

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: arg list too long in unix

2002-08-29 Thread Glenn Travis

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 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-Applet178_11Jan02_0959AM_34108.txt
  cz-session-returnui175_11Jan02_0959AM_20504.txt
  cz-session-DHTML176_11Jan02_0959AM_22335.txt
  cz-session-returnui179_11Jan02_1000AM_34566.txt
  cz-session-Applet180_11Jan02_1000AM_34818.txt
  cz-session-BatchSingle181_11Jan02_1001AM_07757.txt
  cz-session-BatchSingle182_11Jan02_1001AM_11687.txt
  cz-session-BatchSingle183_11Jan02_1001AM_14010.txt
  cz-session-BatchSingle184_11Jan02_1001AM_17708.txt
  cz-session-BatchSingle185_11Jan02_1001AM_20029.txt
 
 but when I issue ls -ltr cz* , I am getting arg list
 too long error. I 70,000-80,000 files that needs to be
 removed from the directory.
 
 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.
 
 thanx in advance,
 srinivas
 
 __
 Do You Yahoo!?
 Yahoo! Finance - Get real-time stock quotes
 http://finance.yahoo.com
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: kommareddy sreenivasa
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Glenn Travis
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-29 Thread Philip Douglass

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 -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Thursday, August 29, 2002 7:43 AM


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.

  cz-session-returnui177_11Jan02_0959AM_33509.txt
  cz-session-Applet178_11Jan02_0959AM_34108.txt
  cz-session-returnui175_11Jan02_0959AM_20504.txt
  cz-session-DHTML176_11Jan02_0959AM_22335.txt
  cz-session-returnui179_11Jan02_1000AM_34566.txt
  cz-session-Applet180_11Jan02_1000AM_34818.txt
  cz-session-BatchSingle181_11Jan02_1001AM_07757.txt
  cz-session-BatchSingle182_11Jan02_1001AM_11687.txt
  cz-session-BatchSingle183_11Jan02_1001AM_14010.txt
  cz-session-BatchSingle184_11Jan02_1001AM_17708.txt
  cz-session-BatchSingle185_11Jan02_1001AM_20029.txt

 but when I issue ls -ltr cz* , I am getting arg list
 too long error. I 70,000-80,000 files that needs to be
 removed from the directory.

 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.


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Nuno Souto
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Philip Douglass
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: arg list too long in unix

2002-08-29 Thread Markham, Richard
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.



-Original Message-
From: Nuno Souto [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 29, 2002 7:43 AM
To: Multiple recipients of list ORACLE-L
Subject: Re: arg list too long in unix



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.
 
 cz-session-returnui177_11Jan02_0959AM_33509.txt
 cz-session-Applet178_11Jan02_0959AM_34108.txt
 cz-session-returnui175_11Jan02_0959AM_20504.txt
 cz-session-DHTML176_11Jan02_0959AM_22335.txt
 cz-session-returnui179_11Jan02_1000AM_34566.txt
 cz-session-Applet180_11Jan02_1000AM_34818.txt
 cz-session-BatchSingle181_11Jan02_1001AM_07757.txt
 cz-session-BatchSingle182_11Jan02_1001AM_11687.txt
 cz-session-BatchSingle183_11Jan02_1001AM_14010.txt
 cz-session-BatchSingle184_11Jan02_1001AM_17708.txt
 cz-session-BatchSingle185_11Jan02_1001AM_20029.txt
 
 but when I issue ls -ltr cz* , I am getting arg list
 too long error. I 70,000-80,000 files that needs to be
 removed from the directory.
 
 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.



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Nuno Souto
 INET: [EMAIL PROTECTED]


Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).





Re: arg list too long in unix

2002-08-29 Thread Steven Lembark


 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 60647
+1 800 762 1582
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Steven Lembark
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-29 Thread Steven Lembark



-- 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 {} \;'

Anyone who invokes xargs from ls * needs to learn how to use
xargs: feed it with things that ae not affected by the arg
list. For example:

find . -type f -name 'cz*' | xargs rm -f;

is one nice way: the '*' is not expanded on the command line
but used with an internal glob call in find.

Other problem with using ls for large file op's is that it
attempts to sort the output, which is expensive and a memory
hog. Find simply spits out matching files as they are found.


--
Steven Lembark   2930 W. Palmer
Workhorse Computing   Chicago, IL 60647
+1 800 762 1582
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Steven Lembark
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: arg list too long in unix

2002-08-29 Thread Steven Lembark



-- 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 of more forks).

Aside: be quite sure to run this on local storage only;
running this on networked storage can saturate the network
during the erase cycle.

--
Steven Lembark   2930 W. Palmer
Workhorse Computing   Chicago, IL 60647
+1 800 762 1582
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Steven Lembark
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-29 Thread Philip Douglass

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
sets, so I suppose it could have the same 'arg list too long' error as ls.
I've never had to worry about this issue since I've never had 70,000 files
in one directory before!

-- Philip

- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Thursday, August 29, 2002 12:23 PM




-- 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 {} \;'

Anyone who invokes xargs from ls * needs to learn how to use
xargs: feed it with things that ae not affected by the arg
list. For example:

find . -type f -name 'cz*' | xargs rm -f;

is one nice way: the '*' is not expanded on the command line
but used with an internal glob call in find.

Other problem with using ls for large file op's is that it
attempts to sort the output, which is expensive and a memory
hog. Find simply spits out matching files as they are found.


--
Steven Lembark   2930 W. Palmer
Workhorse Computing   Chicago, IL 60647
+1 800 762 1582
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Steven Lembark
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Philip Douglass
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-29 Thread Jared Still


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 August 2002 07:58, 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 files would
 be: 'find . -name cz\* -exec rm -f {} \;'

 -- Philip

 - Original Message -
 To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
 Sent: Thursday, August 29, 2002 7:43 AM


 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.
 
   cz-session-returnui177_11Jan02_0959AM_33509.txt
   cz-session-Applet178_11Jan02_0959AM_34108.txt
   cz-session-returnui175_11Jan02_0959AM_20504.txt
   cz-session-DHTML176_11Jan02_0959AM_22335.txt
   cz-session-returnui179_11Jan02_1000AM_34566.txt
   cz-session-Applet180_11Jan02_1000AM_34818.txt
   cz-session-BatchSingle181_11Jan02_1001AM_07757.txt
   cz-session-BatchSingle182_11Jan02_1001AM_11687.txt
   cz-session-BatchSingle183_11Jan02_1001AM_14010.txt
   cz-session-BatchSingle184_11Jan02_1001AM_17708.txt
   cz-session-BatchSingle185_11Jan02_1001AM_20029.txt
 
  but when I issue ls -ltr cz* , I am getting arg list
  too long error. I 70,000-80,000 files that needs to be
  removed from the directory.
 
  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.

 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 --
 Author: Nuno Souto
   INET: [EMAIL PROTECTED]

 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-29 Thread lembark



 
 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:

cd $someplace;
find . -type f -name 'cz*' | xargs rm -f;

will happily do the deed. 

Advantage to cd is that a naked '.' won't blow off the entire
system via something like '/ dir_2_clean'.

--
Steven Lembark  2930 W. Palmer
Workhorse Computing  Chicago, IL 60647
   +1 800 762 1582
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: arg list too long in unix

2002-08-29 Thread Joe Testa

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 files would
be: 'find . -name cz\* -exec rm -f {} \;'

-- Philip

- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Thursday, August 29, 2002 7:43 AM


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.

 cz-session-returnui177_11Jan02_0959AM_33509.txt
 cz-session-Applet178_11Jan02_0959AM_34108.txt
 cz-session-returnui175_11Jan02_0959AM_20504.txt
 cz-session-DHTML176_11Jan02_0959AM_22335.txt
 cz-session-returnui179_11Jan02_1000AM_34566.txt
 cz-session-Applet180_11Jan02_1000AM_34818.txt
 cz-session-BatchSingle181_11Jan02_1001AM_07757.txt
 cz-session-BatchSingle182_11Jan02_1001AM_11687.txt
 cz-session-BatchSingle183_11Jan02_1001AM_14010.txt
 cz-session-BatchSingle184_11Jan02_1001AM_17708.txt
 cz-session-BatchSingle185_11Jan02_1001AM_20029.txt

but when I issue ls -ltr cz* , I am getting arg list
too long error. I 70,000-80,000 files that needs to be
removed from the directory.

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.



--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Nuno Souto
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).





-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Joe Testa
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).