LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-10-2005, 07:48 AM   #1
utw-mephisto
Member
 
Registered: Apr 2005
Posts: 93

Rep: Reputation: 16
find /folder/* -exec ./file '{}' -nohomedir \; ???


Hi,

I am using the command above for several occasions, but to be honest, I don't know what exactly the command is doing but of course, I want to know

What I mean :

On a gameserver I use

find /ut/Maps/* -exec ./ucc-bin compress '{}' -nohomedir \;

to execute ./ucc-bin compress on files which are in /ut/Maps/

Someone gave me the command which is working great, but still :

What ist

'{}' -nohomedir \; doing there ?
 
Old 05-10-2005, 08:00 AM   #2
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
I'm a little surprised at the trailing '*' in the path you give. Well, you say it works, so...

find /ut/Maps/ -exec ./ucc-bin compress '{}' -nohomedir \;

means:

find [in] /ut/Maps/ [any file, link, or directory, and for each of those] -exec[ute the binary that lives in the current directory] ./ [and is named] ucc-bin [. Give it the following parameters: 1st parameter:] compress [2nd parameter:] '{}' [where {} stands for the current file/dir/link/... that was previously found; 3rd parameter:] -nohomedir [and that's all, as indicated by:] \; [, which is escaped using \ so that bash (the shell) does not interpret it.]

Yves.
 
Old 05-10-2005, 08:09 AM   #3
utw-mephisto
Member
 
Registered: Apr 2005
Posts: 93

Original Poster
Rep: Reputation: 16
WOW, that makes sences now

Thanks for the fast reply
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I execute two commands on exec of a find? eantoranz Programming 3 08-03-2010 04:51 PM
find: missing argument to `-exec' pavodive Linux - Newbie 4 10-05-2009 02:24 PM
Help sought with 'find -exec' drjones69 Linux - Software 2 04-27-2005 04:02 AM
find -exec question eantoranz Linux - General 1 06-26-2004 10:57 AM
find -exec cricbk Linux - Newbie 4 01-05-2004 07:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration