[Digikam-users] Not completely but a bit off topic question: looking for texteditor with macro capabillity

Johnny yggdrasil at gmx.co.uk
Sun Aug 28 09:46:51 BST 2011


sleepless <sleeplessregulus at hetnet.nl> writes:

>> ,----
>> | find /dir/to/search/ -maxdepth 1 -type f -iregex .*\.jpg$ -exec cp {} /dir/to/copy/to/ \;
> compare this to
> copy dir\to\search\*.jpg /s dir\to\copy

Well, this would be the same as:

,----
| cp /dir/to/search/*.jpg /dir/to/copy/to/
`----

This limits you however to only searching one directory at a time,
whereas find lets you search your entire HDD if you want for jpgs (or
whatever files you specify), but is good enough if that's all you need.

Compare this to what you initially described and Benjamin showed how to
do in a shell script; you could also use 'find' to loop over files
and operate on them by changing the part after '-exec' to do what you
want, e.g. 'mv' for move 'rm' for delete and so on.

-- 
Johnny



More information about the Digikam-users mailing list