Skip to content
Advertisement

Displaying all .png images with display command in linux [closed]

To display an image in a folder, one uses display image.png

If I want to open all .png files in a subfolder, I tried display *.png, but did not work.

How could this be done in interactive shell?

Thanks

Advertisement

Answer

Try this:

for f in ./subdir/*.png; do
display $f &
done

It should loop through all your files inside the subdir and display all *.png files, starting each as a background process.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement