I have set of image files in a directory that I want to delete using command-line. The file names progress as follows:
image0000.png
....
image0599.png
I know we will need to use for-loop in the commmand-line but what would be the right syntax?
If you want to delete all the files in a directory with names like imageXXX.png, you won't have to use a for loop. You can use a wildcard like this rm image*
.
Note-This will remove all the files in the current directory with names like imageXXXX