Sponsored Content
Top Forums UNIX for Dummies Questions & Answers find command on a empty directory - bad status Post 302970274 by MadeInGermany on Monday 4th of April 2016 04:10:13 PM
Old 04-04-2016
The + collects arguments (up to a certain limit) and runs one (or few) rm -f arg1 arg2 ...,
while the ; each time runs the program with one argument rm -f arg1; rm -f arg2; ....
 

10 More Discussions You Might Find Interesting

1. Programming

How to find the exit status of last command in Unix?

Hi, I want to find the exit status of the last executed command in C Shell. Tried $? but getting the error Variable syntax...$? does not seem to work in C shell.. is there any other command in C shell to find the exit status of last command? Thanks in advance, raju (1 Reply)
Discussion started by: rajugp1
1 Replies

2. UNIX for Dummies Questions & Answers

how to find the exit status for the last executed command

I am executing a find command in my script i.e find $2 -type f -name '*.gif' -mtime +$1 -exec rm {} \; how do i check that this command is executed properly.. i would lke t trap the errror and display my error message kinly help.. this is an urgent issue. (1 Reply)
Discussion started by: vijay.amirthraj
1 Replies

3. UNIX for Dummies Questions & Answers

Getting same exit status for empty and non empty file

Hi All, I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both. The value of $? is coming 0 in if part also and else part too. #!/bin/ksh if ]; then echo "data" # exit 0 echo "$?" else... (4 Replies)
Discussion started by: mavesum
4 Replies

4. UNIX for Advanced & Expert Users

Equivalents of tee command to find exit status of command

Hi, Want to log the output of command & check the exit status to find whether it succeeded or failed. > ls abc ls: abc: No such file or directory > echo $? 1 > ls abc 2>&1 | tee log ls: abc: No such file or directory > echo $? 0 Tee commands changes my exit status to be always... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies

5. UNIX for Dummies Questions & Answers

Find command returning bad status--

would like to remove the post (8 Replies)
Discussion started by: vk39221
8 Replies

6. Shell Programming and Scripting

How to find empty files in a directory and write their file names in a text?

I need to find empty files in a directory and write them into a text file. Directory will contain old files as well, i need to get the empty files for the last one hour only. (1 Reply)
Discussion started by: vel4ever
1 Replies

7. Shell Programming and Scripting

Delete empty files from a directory entered in command prompt

My code to "Delete empty files from a directory entered in command promt" #/bin/sh echo "Enter directory" read gh for file in `ls $gh` do # to get the size of file a=$( ls -l file | awk ' {print $7} '); echo $a if then echo "removing file " rm file fi done (6 Replies)
Discussion started by: adirajup
6 Replies

8. UNIX for Dummies Questions & Answers

Exit Status Of Find Command

Hello All, I am trying to capture the exit status of find command and want to delete the files only when it is successful. But it is always returning me as success even if the pattern of that file doesn't exist in the current directory. please help, checked manual page but couldn't able to figure... (6 Replies)
Discussion started by: Ariean
6 Replies

9. Shell Programming and Scripting

Trapping the return status from FIND command

I have the following code in a script: find . \( ! -name . -prune \) -name "cg*" -exec cp -p {} "${temp_dir}" \; ret_stat=$? I think the return status is only captured for the 'find' command and not for the 'cp' command. Is there a way to get the return status for the 'cp' command... (7 Replies)
Discussion started by: vskr72
7 Replies

10. UNIX for Beginners Questions & Answers

Find command giving bad status error

In a fastload teradata utility I am trying to delete the files which are older than 30days using the find and rm command as following. find . -name 'xxx_*' -mtime +30 -exec rm -f {} \; I expect it to delete all the files older than 30 days but sometimes it gives an error : find: bad status--... (3 Replies)
Discussion started by: stelkar
3 Replies
XCALL(9)						   BSD Kernel Developer's Manual						  XCALL(9)

NAME
xcall, xc_broadcast, xc_unicast, xc_wait -- cross-call interface SYNOPSIS
#include <sys/xcall.h> typedef void (*xcfunc_t)(void *, void *); uint64_t xc_broadcast(u_int flags, xcfunc_t func, void *arg1, void *arg2); uint64_t xc_unicast(u_int flags, xcfunc_t func, void *arg1, void *arg2, struct cpu_info *ci); void xc_wait(uint64_t where); DESCRIPTION
The machine-independent xcall interface allows any CPU in the system to request that an arbitrary function be executed on any other CPU. Sometimes it is necessary to modify hardware state that is tied directly to individual CPUs (such as a CPU's local timer), and these updates can not be done remotely by another CPU. The LWP requesting the update may be unable to guarantee that it will be running on the CPU where the update must occur, when the update occurs. Additionally, it is sometimes necessary to modify per-CPU software state from a remote CPU. Where these update operations are so rare or the access to the per-CPU data so frequent that the cost of using locking or atomic operations to provide coherency is prohibitive, another way must be found. Cross calls help to solve these types of problem. However, since this facility is heavyweight, it is expected that it will not be used often. xcall provides a mechanism for making ``low priority'' cross calls. The function to be executed runs on the remote CPU within a thread con- text, and not from a software interrupt, so it can ensure that it is not interrupting other code running on the CPU, and so has exclusive access to the CPU. Keep in mind that unless disabled, it may cause a kernel preemption. xcall also provides a mechanism for making ``high priority'' cross calls. The function to be executed runs on the remote CPU within a IPL_SOFTCLOCK software interrupt context, possibly interrupting other lower-priority code running on the CPU. NOTES
Functions being called should be relatively lightweight. They may block on locks, but carefully and minimally, to not interfere with other cross calls in the system. FUNCTIONS
xc_broadcast(flags, func, arg1, arg2) Call (*func)(arg1, arg2) on all CPUs in the system. Return a uint64_t ``ticket'' to xc_wait() on for the cross-call to complete. flags should be XC_HIGHPRI for a "high priority" call, and 0 for a "low priority" call. xc_broadcast() should not be called from interrupt context. xc_unicast(flags, func, arg1, arg2, ci) Like xc_broadcast(), but call (*func)() on only the CPU indicated by ci. xc_unicast() also returns a ``ticket''. xc_wait(where) Wait on the ``ticket'' returned by a prior xc_broadcast() or xc_unicast() for the corresponding cross-call to complete. xc_wait() should be called from a thread context. CODE REFERENCES
The xcall interface is implemented within the file sys/kern/subr_xcall.c. SEE ALSO
kpreempt(9), percpu(9) HISTORY
The xcall interface first appeared in NetBSD 5.0. AUTHORS
Andrew Doran <ad@NetBSD.org> BSD
October 24, 2011 BSD
All times are GMT -4. The time now is 03:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy