how to pipe output of find into eog

I’m trying to view photos in a slideshow which are nested within other folders but can be found with the find command.

The find command on its own does find all the listed photos but this –

find  /path/to/parent/folder -name "*2006*" | eog --slide-show

Does not display the slideshow I had hoped for. Does anyone know what is wrong and how to fix it?

Asked By: cardamom


You could use the -exec flag of find:

For a slideshow:

This opens all images that are matching *2006* and additionaly all images in directories matching *2006* and there might be duplicates. As you said you can only show matching files with -type f or only show files in matching directories with -type d.

find /path/to/parent/folder -name "*2006*" -exec eog --slide-show {} +

This would open every found image in a new eog instance and a slideshow for every found directory:

find /path/to/parent/folder -name "*2006*" -exec eog --slide-show {} ;

Answered By: ctx
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.