Sponsored Content
Full Discussion: Find command takes long
Top Forums Shell Programming and Scripting Find command takes long Post 302949514 by mohtashims on Sunday 12th of July 2015 08:02:24 AM
Old 07-12-2015
Quote:
Originally Posted by Don Cragun
No! How do you suppose find determines which files it finds in a file hierarchy search are directories as opposed to some other type of file? It reads all of the directory entries in each directory it finds and then uses stat() (or a similar system call) to determine the type of that file. The find utility has no way to magically ignore non-directory files before it determines whether or not that file is a directory.

However, if find does encounter any directory that is mode 600, it won't be able to examine any files in or under that directory.

If you know that the pathname to the directory you want to process is /opt/app/var/dumps/mont, why are you using find instead of something like:
Code:
ls -ld /opt/app/var/dumps/mont

?
The reason i am using find instead ls ls -ld is becoz along with making sure mont exists under dump folder i should be able to check permissions on mont folder
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding out how long a command takes to run

Hi I am trying to find out the best way to find out how long a command takes to run in miliseconds .. Is there such a way of doing this in Unix ? Thanks (3 Replies)
Discussion started by: cfoxwell
3 Replies

2. Shell Programming and Scripting

command find returned bash: /usr/bin/find: Argument list too long

Hello, I create a file touch 1201093003 fichcomp and inside a repertory (which hava a lot of files) I want to list all files created before this file : find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies

3. Programming

fwrite takes extremely long time

After my previous thread, I think I found out what causes the long delays. I run this program on several Linux computers, and the sometimes (after the file with the arrays becomes big) the fwrite takes between 100 ms to 900 ms. This is very bad for me, as I want a timer to halt each 30 ms.... ... (5 Replies)
Discussion started by: inna
5 Replies

4. Shell Programming and Scripting

Killing a process that takes too long

Hello, I have a C program that takes anywhere from 5 to 100 arguments and I'd like to run it from a script that makes sure it doesnt take too long to execute. If the C program takes more than 5 seconds to execute, i would like the shell script to kill it and return a short message to the user. ... (3 Replies)
Discussion started by: WeezelDs
3 Replies

5. Shell Programming and Scripting

find command takes a lot of time ( can I skip directories)

I have a file called "library" with the following content libnxrdbmgr.a libnxrdbmgr.so libnxtk.a libnxtk.so libora0d_nsc_osi.so I am trying to locate if these libraries are on my machine or not. find command runs for about few seconds and hangs after this. Can someone please help me and... (3 Replies)
Discussion started by: knijjar
3 Replies

6. UNIX for Dummies Questions & Answers

time how long it takes to load a module

Hello, like the title says, how can i measure the time it takes to load a module in Linux, and how how can i measure the time it takes to load a statically compiled module. /Best Regards Olle ---------- Post updated at 01:13 PM ---------- Previous update was at 11:54 AM ---------- For... (0 Replies)
Discussion started by: ollebanan
0 Replies

7. Shell Programming and Scripting

sort takes a long time

Dear experts I have a 200MG text file in this format: text \tab number I try to sort using options -fd and it takes very long! is that normal or I can speed it up in some ways? I dont want to split the file since this one is already splitted. I use this command: sort -fd file >... (12 Replies)
Discussion started by: voolek
12 Replies

8. Shell Programming and Scripting

Timeout to abolish ssh connection command it takes too long

Hi, I am running a ssh connection test in a script, how can I add a timeout to abolish the process if it takes too long? ssh -i ~/.ssh/ssl_key useraccount@computer1 Thank you. - j (1 Reply)
Discussion started by: hce
1 Replies

9. UNIX for Advanced & Expert Users

Find command takes too long to complete

Hi, Below is my find command find /opt/app/websphere -name myfolder -perm -600 | wc -l At time it even takes 20 mins to complete. my OS is : SunOS mypc 5.10 Generic_150400-09 sun4v sparc SUNW,T5440 (10 Replies)
Discussion started by: mohtashims
10 Replies

10. Shell Programming and Scripting

Script takes too long to complete

Hi, I have a lengthy script which i have trimmed down for a test case as below. more run.sh #!/bin/bash paths="allpath.txt" while IFS= read -r loc do echo "Working on $loc" startdir=$loc find "$startdir" -type f \( ! -name "*.log*" ! -name "*.class*" \) -print | while read file do... (8 Replies)
Discussion started by: mohtashims
8 Replies
BN_mod_mul_montgomery(3)					      OpenSSL						  BN_mod_mul_montgomery(3)

NAME
BN_mod_mul_montgomery, BN_MONT_CTX_new, BN_MONT_CTX_init, BN_MONT_CTX_free, BN_MONT_CTX_set, BN_MONT_CTX_copy, BN_from_montgomery, BN_to_montgomery - Montgomery multiplication SYNOPSIS
#include <openssl/bn.h> BN_MONT_CTX *BN_MONT_CTX_new(void); void BN_MONT_CTX_init(BN_MONT_CTX *ctx); void BN_MONT_CTX_free(BN_MONT_CTX *mont); int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *m, BN_CTX *ctx); BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from); int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_MONT_CTX *mont, BN_CTX *ctx); int BN_from_montgomery(BIGNUM *r, BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx); int BN_to_montgomery(BIGNUM *r, BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx); DESCRIPTION
These functions implement Montgomery multiplication. They are used automatically when BN_mod_exp(3) is called with suitable input, but they may be useful when several operations are to be performed using the same modulus. BN_MONT_CTX_new() allocates and initializes a BN_MONT_CTX structure. BN_MONT_CTX_init() initializes an existing uninitialized BN_MONT_CTX. BN_MONT_CTX_set() sets up the mont structure from the modulus m by precomputing its inverse and a value R. BN_MONT_CTX_copy() copies the BN_MONT_CTX from to to. BN_MONT_CTX_free() frees the components of the BN_MONT_CTX, and, if it was created by BN_MONT_CTX_new(), also the structure itself. BN_mod_mul_montgomery() computes Mont(a,b):=a*b*R^-1 and places the result in r. BN_from_montgomery() performs the Montgomery reduction r = a*R^-1. BN_to_montgomery() computes Mont(a,R^2), i.e. a*R. Note that a must be non-negative and smaller than the modulus. For all functions, ctx is a previously allocated BN_CTX used for temporary variables. The BN_MONT_CTX structure is defined as follows: typedef struct bn_mont_ctx_st { int ri; /* number of bits in R */ BIGNUM RR; /* R^2 (used to convert to Montgomery form) */ BIGNUM N; /* The modulus */ BIGNUM Ni; /* R*(1/R mod N) - N*Ni = 1 * (Ni is only stored for bignum algorithm) */ BN_ULONG n0; /* least significant word of Ni */ int flags; } BN_MONT_CTX; BN_to_montgomery() is a macro. RETURN VALUES
BN_MONT_CTX_new() returns the newly allocated BN_MONT_CTX, and NULL on error. BN_MONT_CTX_init() and BN_MONT_CTX_free() have no return values. For the other functions, 1 is returned for success, 0 on error. The error codes can be obtained by ERR_get_error(3). WARNING
The inputs must be reduced modulo m, otherwise the result will be outside the expected range. SEE ALSO
bn(3), ERR_get_error(3), BN_add(3), BN_CTX_new(3) HISTORY
BN_MONT_CTX_new(), BN_MONT_CTX_free(), BN_MONT_CTX_set(), BN_mod_mul_montgomery(), BN_from_montgomery() and BN_to_montgomery() are available in all versions of SSLeay and OpenSSL. BN_MONT_CTX_init() and BN_MONT_CTX_copy() were added in SSLeay 0.9.1b. 1.0.1e 2013-02-11 BN_mod_mul_montgomery(3)
All times are GMT -4. The time now is 09:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy