Parallel RM and FIND commands conflicting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Parallel RM and FIND commands conflicting
# 1  
Old 12-05-2017
Parallel RM and FIND commands conflicting

Hi all.

Long time!!
Hope you're doing well..

I've stumbled on a peculiar siutaion here, and would expect help from this forum on a clean resolution.

We are running an rm and find command simultaneously from two different Unix sessions of the same user(let's say USER01) and on the same directory (say /tmp/dir01), but with two mutually exclusive search strings which are completely different from each other(commands as follows)

Code:
cd /tmp/dir01; rm *STRING01*
find /tmp/dir01 -name "*STRING02*" -type f

Where STRING01 != STRING02

However the find command fails sting that it's not able to find files of *STRING01*

Why is the find command searching for STRING01 instead of STRING02?

Please help.

Regards
Kumarjit

linux: 2.6x
Shell: korn

Last edited by jim mcnamara; 12-05-2017 at 03:14 AM..
# 2  
Old 12-05-2017
I do not see why the posted code would fail to find, if the files do exist.
Is the example precisely what you ran? Don't assume, please go back and check.
# 3  
Old 12-05-2017
Hello Jim, thanks for the feedback, but these are the exact commands that were run, and I cannot quote the actual file path/search patterns in this forum.

The find command throws error that its not able to find files matching the search pattern in rm, is what confuses us.

Regards.
Kumarjit
# 4  
Old 12-05-2017
Confirmed, overdone optimization has broken GNU find. If you have SuSE or RHEL you should open a support ticket.
What can help:
Run find with -noleaf.
If that does not help, run an old find from CentOS 5.11, or get the sources of this old version for your system. Still you need the -noleaf option (and there it really helps).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Egrep: conflicting matchers specified

This bit of code works fine: egrep -i '^rmcat' /etc/oratab |\ awk -F\: '{print $1}'|\ while read ORACLE_SID do But when I modified it, thus: egrep -v '^#' /etc/oratab |egrep -v '^$' | egrep -v '^listener' \ awk -F\: '{print $1}'|\ while read ORACLE_SID do (3 Replies)
Discussion started by: edstevens
3 Replies

2. Shell Programming and Scripting

Find commands help

hi gurus, I need a example. I am looking for a source code. where I got the keyword "altria_fetch" and also the keyword is present in the file ".pc" files. and it is present in the directory /fast folder. Inside fast there are lot of sub directories present on it. I am not sure how to reach... (8 Replies)
Discussion started by: ramkumar15
8 Replies

3. UNIX for Dummies Questions & Answers

Conflicting GID in group and passwd files.

Hi guys, I have a question. In the passwd file, user johndoe has a GID of 100 which is the group named users in the group file. But if you check the group file, johndoe is not listed under GID 100, but under GID 33, which is the group named videos. Under what group does johndoe really belong,... (1 Reply)
Discussion started by: goldenlight1814
1 Replies

4. Solaris

Parallel Find command

Hi All, I ran parallel 80 Commands as below, #################################3 PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 23677 root 1040K 856K sleep 58 0 0:04.04 0.7% find/1 23700 root 1040K 856K sleep 58 0 0:03.59 0.6% find/1 ... (4 Replies)
Discussion started by: ajaincv
4 Replies

5. Shell Programming and Scripting

Find and execute shell scripts in multiple sub directories in parallel

I have one parent directory and within that parent directory there are several other sub-directories and within those sub-directories there are several other "large number" of sub-directories. All the sub directories have a shell script in them with a common file name execute_command.sh I want... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies

6. Shell Programming and Scripting

Executing two commands in parallel

Hi, I am stuck into a situation where i want to execute a command in my shell script well along with a previous command in order to achieve something but i am not figuring out a way. here is a snippet: service management restart rm -rf lock.file in the above, if you see, i am trying to... (5 Replies)
Discussion started by: sunrexstar
5 Replies

7. Solaris

Conflicting 'typedef' error - Which gcc switch to use?

I am using gcc3.3.5 on solaris2.7. Its a 64 bit compilation I am compiling a file 'plugin.cpp'. It includes mach.h and the complation gives the following error. ----------------------------------------------------------------- mach.h error: conflicting types for `typedef vx_u32_t... (0 Replies)
Discussion started by: amitc
0 Replies

8. HP-UX

why does my program runs in conflicting mode?

my pragram runs with 3 threads, 2 work threads, one main thread. the 2 work threads run with the same mode and the same code. but now, one of the work thread can't work, and it uses the cpu more than 80%, sometimes uses 100% cpu resource. the another work thread work well. when I viewed the HP... (2 Replies)
Discussion started by: happylife365
2 Replies

9. Shell Programming and Scripting

Execute commands parallel in a for loop ?

Hi, please can someone point me in the right direction with a shell scripting problem. I want to execute a command in a for loop and the command should be started not one-by-one meaning the for loop is waiting for the exit code , it should be started in parallel. I have a plain text file... (3 Replies)
Discussion started by: networkfre@k
3 Replies

10. UNIX for Dummies Questions & Answers

Where do I find what commands I can use?

I am new to this unix thing. I have a macintosh with os X and want to learn how to use the unix terminal. What do I need to get started? Does anyone know some good command lines to get started with? Can I use the terminal to check email and get on the internet etc.....?:( (3 Replies)
Discussion started by: JCWorkman
3 Replies
Login or Register to Ask a Question