Recursive File List With Shopt


Shopt is a builtin command in bash. Sometimes it can replace all rows of "find" commands.

#! /bin/bash
shopt -s globstar
for filein in /yourpath/**
do
    if [ -f "$filein" ]; then
        echo "$filein"
    fi
done;

Tags: linux bash