Linux Command Reference

For loop for the Bash Shell

Command Description:

Sometimes a for loop is needed to iterate over the contents of a directory... see the command below which removes all .jpg files in a directory

$ for f in *.jpg; do rm "$f"; done
Permissions: $
Flags:
Tags: for