Posts Tagged ‘awk’

Command Line – search for all images in a folder

Wednesday, August 3rd, 2011

find /opt/wherever/you/want/to/search -type f -name *.jpg -ls

You might have to do it a few times for different file types.  Or you can just leave the “-name *.jpg” part out and it will just give you your report on ALL of your files.

If you don’t like full bytes you could pipe some commands together…..

find /opt/wherever/you/want/to/search -type f -name *.jpg | awk ‘{system(“ls -lh \”"0″\”")}’

Thanks Dave for this tidbit of information!