For loop, example renaming all files in current directory to .oldfor i in `/bin/ls`; do mv $i $i.old ; done Find and exec; example deleting all files with names ending in .oldfind . -iname *.old -exec rm -i {} \; For loop with if's on command line, example finding files that are not on the systemfor i in `cat myListe`; do if [[ ! -f $i ]]; then echo $i >> notfoundlist ;fi; done Find dead symlinksfind . -type l ! -exec test -r {} \; -print List all ipaddressesifconfig | sed -n 's/.*dr:\(.*\) Bc.*/\1/p'