Suppose I have the following bash code:
!#/bin/bash
function print_echo (){
echo "This is print_echo Function" $1;
}
find ./ -iname "*" -exec print_echo {} \;
For each -exec command i get the following error:
find: `print_echo': No such file or directory
NOTE: Before it , i tested it for a critical program , and solved my program with another algorithm but it's a question: Why find comm
I'm on Solaris 10 and I have tested the following with ksh(88), bash(3.00) and zsh(4.2.1).
The following code doesn't yield any result:
function foo {
echo "Hello World"
}
find somedir -exec foo \;
The find does match several files (as shown by replacing -exec ...
A few months ago I had accidentally moved the contents (mp3 files) out of their folders, up one layer in the main folder.
Quote:
find ./ -iname "*.avi" -exec mv '( )' /home/SillyNubee/Music/Jazz
When I re-ran the command, I got a "Find: missing argument to 'exec'
Is there a more elegant way to move the contents into the main folder
I try to find many files in many folders with specific content, and delete them.
find dir.*/* -exec grep -l "content" {} \; | xargs rm -f
And I get following message:
-bash: /bin/find: Argument list too long
Can you help me?
Greeting all
I'mtrying to move the contents of folders (mp3 file) to my Music folder.
When I run the command found below, I get a "find: missing argument to `-exec'
" error
WTF
Quote:
find ./ -iname *".mp3" -exec mv {} ./home/imhotep/Music
I have a large directory of music files that is often changing as files and directories come and go.
I have come across a strange error that I haven't been able to figure out what it means or how to fix it:
sudo find . -type f -exec ls -lT {} +
find: fts_read: Invalid argument
What does this mean? And why is this occurring?
Note: I am using osx for this command.
Hi,
I have two scripts that remove files. One works fine and is coded
Code:
find -name "syst*" -mtime +1 -exec rm {} \;
The other is almost the same - only thing missing is the '\'.
Hi,
I need to delete the last N days file using find.
I am trying to use
find . -mtime -10 -print
which lists down required files.
but when i use
find . -mtime -10 -exec ls -lrt {} \;
it gives me all files in the directory including the required files but the required files are having ./ preceded with them.
Now when I tried
find .