User-define action is a feature of Bash in linux. In Linux terminal if I write
root@localhost: find ~ -type f -name 'foo*' -ok ls -l '{}' ';'
then it checks if there is any filename starting with foo
and shows the file details like this:
< ls ... /home/me/bin/foo > ? y
-rwxr-xr-x 1 me me 224 2011-10-29 18:44 /home/me/bin/foo
< ls ... /home/me/foo.txt > ? y
-rw-r--r-- 1 me me 0 2012-09-19 12:53 /home/me/foo.txt
As long as I press y it shows me those results.
My question is what is the special meaning of the '{}' ';'
characters ?
I read somewhere that {}
represents the current path and ';'
ends the command, but in bash I never end a line with ';'
.