#!/bin/bash
cd $1
ls -la
for file in $(ls $1)
do
date=$(stat --printf '%w' $file | awk '{print $1}')
test=$(echo "$file" | grep -o $date)
if [[ $test == '' ]]; then
mv $file $date-$file
fi
done
date=$(stat --printf '%w' "$file" | awk '{print $1}')
mv "$file" "$date-$file"
for file in "$1"/*