Sponsored Content
Full Discussion: 'find' command question
Top Forums UNIX for Dummies Questions & Answers 'find' command question Post 16869 by peter.herlihy on Thursday 7th of March 2002 06:28:24 PM
Old 03-07-2002
Just answer your question about the {} braces.....

The braces become the result set from the find command....... so your rm {} will effectively do a "rm /dira/cor /dirb/core /dirc/core"

Replacing the {} with all returned arguments from the find query. So for example if you wanted to cp the result of your search to a certain directory you could use:

find . -name my_file -exec cp {} /export/home/all_my_files/ \;

This would copy the file it found on the file system to your specified directory. Obviously for this you could only do it for a single return.....as if find retrieves multiple instances (as with your core search) then you'd be in a world of pain.

If you want multiple things to be done...i.e. renaming the result files then you'd use the xargs command (RTM).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed 's/~/\^J/g' how to get "^J" on same line as rest of the command.

when ever i type it in it always looks like so echo $file | sed 's/~/\ /g' how can i get it on one line? (6 Replies)
Discussion started by: Optimus_P
6 Replies

2. Programming

i can't use 'make' in my computer?

I need to compile a file,but 'make' does not work.please tell me how to use it or need which tools? (3 Replies)
Discussion started by: dsun5
3 Replies

3. UNIX for Dummies Questions & Answers

what is the 'whatis' command?

I am kind of new with Unix and I really need some help. Can you please tell me what the 'whatis' command is? and what does it do? Let's say that I have a file which I want to delete, what command will I need to use? If I have a directory that I want to delete all files from what command do... (11 Replies)
Discussion started by: mischiefdemon
11 Replies

4. Shell Programming and Scripting

Clearify what it means under 'WHAT' when hit the 'w'-command

I wonder how I shall read the result below, especially 'what' shown below. The result was shown when I entered 'w'. E.g what is TOP? What is gosh ( what does selmgr mean?)? login@ idle JCPU PCPU what 6:15am 7:04 39 39 TOP 6:34am 6:45 45 45 TOP 6:41am ... (1 Reply)
Discussion started by: Aelgen
1 Replies

5. UNIX for Dummies Questions & Answers

Further question on 'ifconfig' output

I asked a similar question earlier and got a very good answer but a new doubt came up. This is a few lines of a '/sbin/ifconfig' command on my PC: RX packets:3781025 errors:0 dropped:0 overruns:0 frame:0 TX packets:1941909 errors:0 dropped:0 overruns:0 carrier:0 Does the RX and TX packets... (1 Reply)
Discussion started by: mint1981
1 Replies

6. UNIX for Dummies Questions & Answers

quoting echo 'it's friday'

echo 'it's friday' why appear the > (3 Replies)
Discussion started by: yls177
3 Replies

7. UNIX for Dummies Questions & Answers

VI 'go to position #' command

I apologize is this is somewhere else but I did look.... Is there a command to goto position # x within the VI editor? I've seen where you can search for a particular char string but I need to go to position 200 within a record (tired of counting positions)...:) Thanks in advance... (2 Replies)
Discussion started by: hedrict
2 Replies

8. UNIX for Advanced & Expert Users

memory free up using 'find'

Hi, I am facing an interesting aspect of find command... to be clear, we are running a small web server with oracle 8i database and Oralce9iAS on Sun E250 with Solaris 2.6 Over a period of time, the free memory ( displayed in 'top' utility ) drops down.. we could relate this to dedicated... (6 Replies)
Discussion started by: shibz
6 Replies

9. UNIX for Advanced & Expert Users

How to remove a file with a leading dash '-' in it's name?

Somehow someone created a file named '-ov' in the root directory. Given the name, the how was probably the result of some cpio command they bozo'ed. I've tried a number of different ways to get rid of it using * and ? wildcards, '\' escape patterns etc.. They all fail with " illegal option --... (3 Replies)
Discussion started by: GSalisbury
3 Replies

10. Shell Programming and Scripting

What are the differences between 'bash' and 'sh'

Hopefully this doesn't come off as too much of a "newbie" question or a flamebait. But I have recently begun working with a Sun Solaris box after having spent the past five years working with RedHat. From what i can tell, thing look fairly similar and the 'man' command is some help. But I've... (7 Replies)
Discussion started by: deckard
7 Replies
find(n) 							    [incr Tcl]								   find(n)

__________________________________________________________________________________________________________________________________________________

NAME
find - search for classes and objects SYNOPSIS
itcl::find option ?arg arg ...? _________________________________________________________________ DESCRIPTION
The find command is used to find classes and objects that are available in the current interpreter. Classes and objects are reported first in the active namespace, then in all other namespaces in the interpreter. The option argument determines what action is carried out by the command. The legal options (which may be abbreviated) are: find classes ?pattern? Returns a list of [incr Tcl] classes. Classes in the current namespace are listed first, followed by classes in all other names- paces in the interpreter. If the optional pattern is specified, then the reported names are compared using the rules of the "string match" command, and only matching names are reported. If a class resides in the current namespace context, this command reports its simple name--without any qualifiers. However, if the pattern contains :: qualifiers, or if the class resides in another context, this command reports its fully-qualified name. There- fore, you can use the following command to obtain a list where all names are fully-qualified: itcl::find classes ::* find objects ?pattern? ?-class className? ?-isa className? Returns a list of [incr Tcl] objects. Objects in the current namespace are listed first, followed by objects in all other names- paces in the interpreter. If the optional pattern is specified, then the reported names are compared using the rules of the "string match" command, and only matching names are reported. If the optional "-class" parameter is specified, this list is restricted to objects whose most-specific class is className. If the optional "-isa" parameter is specified, this list is further restricted to objects having the given className anywhere in their heritage. If an object resides in the current namespace context, this command reports its simple name--without any qualifiers. However, if the pattern contains :: qualifiers, or if the object resides in another context, this command reports its fully-qualified name. Therefore, you can use the following command to obtain a list where all names are fully-qualified: itcl::find objects ::* KEYWORDS
class, object, search, import itcl 3.0 find(n)
All times are GMT -4. The time now is 03:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy