Today, I encountered a problem in CentOS. It took tens of minutes to open a folder containing tens of thousands of images. However, each time I operate only a few images, this will waste a lot of time. the best way is to operate through the command line. First, check the number of images. First, use ls-l to display the details of all files in the file. the file permission contains the & rdquo;-& ldquo; character, search for all bands & rdquo;-& l using grep
Today, I encountered a problem in CentOS. It took tens of minutes to open a folder containing tens of thousands of images. However, each time I operate only a few images, this will waste a lot of time. the best way is to operate through the command line.
First, check the number of images. First, use ls-l to display the details of all files in the file. the file permission contains the "-" character, search for all files with "-" by using grep and count by wc-l,
ls -l | grep "^-" | wc -l
Similarly, the folder permission contains the "d" character, so you can use the following command to count the number of folders,
ls -l | grep "^d" | wc -l
You can run the following command to check whether an image file is in a folder. If an image file exists, the image name is displayed. Otherwise, an error message is displayed,
find 1.png
To view basic information about an image, such as the format and resolution, run the following command,
file 1.png
Finally, browse the image through the image browser (Eye of GNOME) under CentOS, and enter the following command to view the image through the command line,
eog 1.png