#!/bin/bash for file in "$1"/* do if test -f "$file"; then stat -c "%a %F %n" "$file" cp "$file" "$file.bkp" fi done