Sponsored Content
Full Discussion: command difference - find
Top Forums UNIX for Dummies Questions & Answers command difference - find Post 302598579 by pandeesh on Wednesday 15th of February 2012 12:06:00 AM
Old 02-15-2012
Quote:
Originally Posted by agama
The biggest potential problem with this command is that the number of files found could cause the command argument limit to be exceeded.
What's the maximum limit for the argument limit?
How to check in every OS?
Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Difference between locate and find

I was wondering what the difference was between the two commands, I understand that locate won't search for files with certain permissions set. Are there any others? Thanks (1 Reply)
Discussion started by: camerja1
1 Replies

2. Emergency UNIX and Linux Support

to find difference between two files

I have a file which gets appended with records daily..for eg. 1st day of the month i get 9 records ,2nd day 9 records .....till the last day in the month...the no of records may vary...i store the previous days file in a variable oldfile=PATH/previousdaysfile....i store the current days file in a... (6 Replies)
Discussion started by: ganesh_248
6 Replies

3. Solaris

Need help to find difference between two files

I need to find the difference between two files in UNIX. I tried diff, but couldn't get it right. There are two files: file1: apple mango strawberry banana grape file2: grape apple banana I need an output file like below: ... (11 Replies)
Discussion started by: kisaad
11 Replies

4. UNIX for Dummies Questions & Answers

Find difference between two files

I have two files as below File1: a b c d File2: a b When i find the difference the output would be c&d.. How can i get my requirement...pls help... Many thanks in advance (10 Replies)
Discussion started by: jagadish_gaddam
10 Replies

5. UNIX for Advanced & Expert Users

Find difference between 2 files

I have 2 files as follows. file1.txt <cell>123</cell> <cell>345</cell> file2.txt <cell>123</cell> <cell>456</cell> out out should be output.txt <cell>456></cell> How do we achieve this> The difference betwenn the two files should be wirtten to the output file.. ... (2 Replies)
Discussion started by: kanthrajgowda
2 Replies

6. Shell Programming and Scripting

To find difference between two files on a whole

Hi, The requirement is to compare two files that has single column of records each. Comparison is to happen on a whole and not line by line. File1.txt 314589929 315611087 304924413 315989094 301171509 302984393 315609549 314593632 File2.txt 315611087 304924413 315989094 (2 Replies)
Discussion started by: anandek
2 Replies

7. Shell Programming and Scripting

How to find time difference?

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 ================================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (1 Reply)
Discussion started by: wnaguib
1 Replies

8. UNIX for Dummies Questions & Answers

Find time difference

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 =============== =================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (23 Replies)
Discussion started by: wnaguib
23 Replies

9. Shell Programming and Scripting

Find with in loops and then difference

Hi All, Please find my problem below: I have a file at two different nodes dev and test 1st find> find /u/dev/local/abc -name ab.dat --Since this file can be in several sub directories 2nd find> find /u/test/local/abc -name ab.dat I find my 1st find result and do compare with 2nd... (5 Replies)
Discussion started by: varun_bharadwaj
5 Replies

10. Shell Programming and Scripting

To find Difference

Hi Friends, I need to find the difference between two files , File_1 contained 4 columns, and File_2 contained 4 columns, I need to find the difference using 1st column, Or need to find the difference using 3st column, (6 Replies)
Discussion started by: Shenbaga.d
6 Replies
Tcl_LimitCheck(3)					      Tcl Library Procedures						 Tcl_LimitCheck(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_LimitAddHandler, Tcl_LimitCheck, Tcl_LimitExceeded, Tcl_LimitGetCommands, Tcl_LimitGetGranularity, Tcl_LimitGetTime, Tcl_LimitReady, Tcl_LimitRemoveHandler, Tcl_LimitSetCommands, Tcl_LimitSetGranularity, Tcl_LimitSetTime, Tcl_LimitTypeEnabled, Tcl_LimitTypeExceeded, Tcl_LimitTypeReset, Tcl_LimitTypeSet - manage and check resource limits on interpreters SYNOPSIS
#include <tcl.h> int Tcl_LimitCheck(interp) int Tcl_LimitReady(interp) int Tcl_LimitExceeded(interp) int Tcl_LimitTypeExceeded(interp, type) int Tcl_LimitTypeEnabled(interp, type) void Tcl_LimitTypeSet(interp, type) void Tcl_LimitTypeReset(interp, type) int Tcl_LimitGetCommands(interp) void Tcl_LimitSetCommands(interp, commandLimit) void Tcl_LimitGetTime(interp, timeLimitPtr) void Tcl_LimitSetTime(interp, timeLimitPtr) int Tcl_LimitGetGranularity(interp, type) void Tcl_LimitSetGranularity(interp, type, granularity) void Tcl_LimitAddHandler(interp, type, handlerProc, clientData, deleteProc) void Tcl_LimitRemoveHandler(interp, type, handlerProc, clientData) ARGUMENTS
Tcl_Interp *interp (in) Interpreter that the limit being managed applies to or that will have its limits checked. int type (in) The type of limit that the operation refers to. This must be either TCL_LIMIT_COM- MANDS or TCL_LIMIT_TIME. int commandLimit (in) The maximum number of commands (as reported by info cmdcount) that may be executed in the interpreter. Tcl_Time *timeLimitPtr (in/out) A pointer to a structure that will either have the new time limit read from (Tcl_Lim- itSetTime) or the current time limit written to (Tcl_LimitGetTime). int granularity (in) Divisor that indicates how often a particular limit should really be checked. Must be at least 1. Tcl_LimitHandlerProc *handlerProc (in) Function to call when a particular limit is exceeded. If the handlerProc removes or raises the limit during its processing, the limited interpreter will be permitted to continue to process after the handler returns. Many handlers may be attached to the same interpreter limit; their order of execution is not defined, and they must be identified by handlerProc and clientData when they are deleted. ClientData clientData (in) Arbitrary pointer-sized word used to pass some context to the handlerProc function. Tcl_LimitHandlerDeleteProc *deleteProc (in) Function to call whenever a handler is deleted. May be NULL if the clientData requires no deletion. _________________________________________________________________ DESCRIPTION
Tcl's interpreter resource limit subsystem allows for close control over how much computation time a script may use, and is useful for cases where a program is divided into multiple pieces where some parts are more trusted than others (e.g. web application servers). Every interpreter may have a limit on the wall-time for execution, and a limit on the number of commands that the interpreter may execute. Since checking of these limits is potentially expensive (especially the time limit), each limit also has a checking granularity, which is a divisor for an internal count of the number of points in the core where a check may be performed (which is immediately before executing a command and at an unspecified frequency between running commands, which can happen in empty-bodied while loops). The final component of the limit engine is a callback scheme which allows for notifications of when a limit has been exceeded. These call- backs can just provide logging, or may allocate more resources to the interpreter to permit it to continue processing longer. When a limit is exceeded (and the callbacks have run; the order of execution of the callbacks is unspecified) execution in the limited interpreter is stopped by raising an error and setting a flag that prevents the catch command in that interpreter from trapping that error. It is up to the context that started execution in that interpreter (typically a master interpreter) to handle the error. LIMIT CHECKING API
To check the resource limits for an interpreter, call Tcl_LimitCheck, which returns TCL_OK if the limit was not exceeded (after processing callbacks) and TCL_ERROR if the limit was exceeded (in which case an error message is also placed in the interpreter result). That func- tion should only be called when Tcl_LimitReady returns non-zero so that granularity policy is enforced. This API is designed to be similar in usage to Tcl_AsyncReady and Tcl_AsyncInvoke. When writing code that may behave like catch in respect of errors, you should only trap an error if Tcl_LimitExceeded returns zero. If it returns non-zero, the interpreter is in a limit-exceeded state and errors should be allowed to propagate to the calling context. You can also check whether a particular type of limit has been exceeded using Tcl_LimitTypeExceeded. LIMIT CONFIGURATION
To check whether a limit has been set (but not whether it has actually been exceeded) on an interpreter, call Tcl_LimitTypeEnabled with the type of limit you want to check. To enable a particular limit call Tcl_LimitTypeSet, and to disable a limit call Tcl_LimitTypeReset. The level of a command limit may be set using Tcl_LimitSetCommands, and retrieved using Tcl_LimitGetCommands. Similarly for a time limit with Tcl_LimitSetTime and Tcl_LimitGetTime respectively, but with that API the time limit is copied from and to the Tcl_Time structure that the timeLimitPtr argument points to. The checking granularity for a particular limit may be set using Tcl_LimitSetGranularity and retrieved using Tcl_LimitGetGranularity. Note that granularities must always be positive. LIMIT CALLBACKS To add a handler callback to be invoked when a limit is exceeded, call Tcl_LimitAddHandler. The handlerProc argument describes the func- tion that will actually be called; it should have the following prototype: typedef void Tcl_LimitHandlerProc( ClientData clientData, Tcl_Interp *interp); The clientData argument to the handler will be whatever is passed to the clientData argument to Tcl_LimitAddHandler, and the interp is the interpreter that had its limit exceeded. The deleteProc argument to Tcl_LimitAddHandler is a function to call to delete the clientData value. It may be TCL_STATIC or NULL if no deletion action is necessary, or TCL_DYNAMIC if all that is necessary is to free the structure with Tcl_Free. Otherwise, it should refer to a function with the following prototype: typedef void Tcl_LimitHandlerDeleteProc( ClientData clientData); A limit handler may be deleted using Tcl_LimitRemoveHandler; the handler removed will be the first one found (out of the handlers added with Tcl_LimitAddHandler) with exactly matching type, handlerProc and clientData arguments. This function always invokes the deleteProc on the clientData (unless the deleteProc was NULL or TCL_STATIC). KEYWORDS
interpreter, resource, limit, commands, time, callback Tcl 8.5 Tcl_LimitCheck(3)
All times are GMT -4. The time now is 03:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy