I want to check my files (recursive), and time of modifying .
anybody has better method ?
anybody has better method ?
Code:
#!/usr/local/bin/bash
### for checking path edit it !
path=$1
find $path | sed "s/^.*/&/" | while read -ers correct_file_name;do
if [ -f "$correct_file_name" ];then
echo -en "$correct_file_name $(perl -e 'print ((stat($ARGV[0]))[9],"\n");' "$correct_file_name" )\n"
elif [ -d "$correct_file_name" ];then
echo -e "\033[1;31m Directory "$correct_file_name" \033[0;0m"
else
echo -e "\033[1;31m Cant find "$correct_file_name" \033[0;0m"
# exit
fi
done