[LBo] "find" util

Geoff Jones geoffjones99 at ntlworld.com
Mon Nov 13 18:26:02 CET 2006


Hi,
I have been playing with "find" [ seems I could spend a week on this alone ! ]

> geoff at debian:~/myfiles$ find . -name "[a-m]*" -exec mv "{}" ../dir_a_m \;
> geoff at debian:~/myfiles$ find . -name "[!a-m]*" -exec mv "{}" ../dir_n_z  \;
> mv: cannot move `.' to `../dir_n_z/.': Device or resource busy


Does the last err message mean once all the current dir files are moved, it is 
trying to move the current directory itself?
[ It has the desired effect of moving a-m files to dir_a_m and n-z files to 
dir_n_z ]

Does any-one have links to good "find" syntax  tutorial - I found the man + 
info pages hard going.
Thanks,

Geoff.


More information about the QnA mailing list