LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   using find command (https://www.linuxquestions.org/questions/linux-newbie-8/using-find-command-796618/)

sumeet inani 03-20-2010 12:14 AM

using find command
 
Hi,
I wanted to queue up all audio files in particular folder which also has .txt files.
I tried
$find /data/songs -iname '[^txt]' -exec totem --enqueue '{}' ';'
Thinking that this will exclude txt like expression in 'grep'.
It did not work
What do you suggest ?

sumeet inani 03-20-2010 12:16 AM

I read the man page of find and got solution

$find /data/songs ! -iname '*.txt' -exec totem --enqueue '{}' ';'

Here ! means that will match which does not agree to specified pattern.
i am using ubuntu 8.04.
Remember your totem should be running before running the above command.


Was there a simpler way ?

Tinkster 03-20-2010 12:55 AM

Nope - that's it.


All times are GMT -5. The time now is 06:31 PM.