Matsaki Registered Mar 20, 2012 #1 How van I in a easy way find out how many image files a directory with many sub directories contains?
How van I in a easy way find out how many image files a directory with many sub directories contains?
A artov Registered Mar 20, 2012 #2 If the directories do not matter, type in Terminal.app (first "cd" to the directory containing the pictures) Code: find . -type f -print|wc -l If not all files are pictures, try something like Code: find . -type f -name '*.jpg' -print|wc -l If your pictures are RAW format, use .cr2 or whatever your camera uses. Last edited: Mar 20, 2012
If the directories do not matter, type in Terminal.app (first "cd" to the directory containing the pictures) Code: find . -type f -print|wc -l If not all files are pictures, try something like Code: find . -type f -name '*.jpg' -print|wc -l If your pictures are RAW format, use .cr2 or whatever your camera uses.
Matsaki Registered Mar 24, 2012 #4 Would you happen to know how I can tar.gz a directory BUT excluding i.e. images from the tar?
ElDiabloConCaca U.S.D.A. Prime Mar 24, 2012 #5 http://www.thejackol.com/2006/09/11/excluding-specific-file-types-using-gnu-tar/ Code: tar czvf archive.tar.gz --exclude=*.jpg --exclude=*.gif [files/directory]
http://www.thejackol.com/2006/09/11/excluding-specific-file-types-using-gnu-tar/ Code: tar czvf archive.tar.gz --exclude=*.jpg --exclude=*.gif [files/directory]
Matsaki Registered Mar 24, 2012 #6 So I can just wright: Code: tar czvf archive.tar.gz --exclude=images To exclude the images folder? (want to be sure not to make any bad mistakes)
So I can just wright: Code: tar czvf archive.tar.gz --exclude=images To exclude the images folder? (want to be sure not to make any bad mistakes)
ElDiabloConCaca U.S.D.A. Prime Mar 24, 2012 #7 No, because "--exclude" only works with files, not directories... but you can do something clever like exclude all files within that directory like so: Code: tar czvf archive.tar.gz --exclude='images/*'
No, because "--exclude" only works with files, not directories... but you can do something clever like exclude all files within that directory like so: Code: tar czvf archive.tar.gz --exclude='images/*'
Matsaki Registered Mar 24, 2012 #8 Thanks El. Because I have 33.000 images in the /images directory so to save time it would be good to exclude that directory. I will cd in to the directory that I will compress and then run your last code.
Thanks El. Because I have 33.000 images in the /images directory so to save time it would be good to exclude that directory. I will cd in to the directory that I will compress and then run your last code.