I need to save information relating to certain files that are projected to deleted.
I am using
Code:
find $defPath/archive/sub/subchild -type f -mtime +365 > LOGFILE
cat LOGFILE|
while read line
do
ls -l $line | cut -d" " -f 10-15
done
But, since cut is cutting columns on space (single space is like a field) the out put fields are irregular.
I want to retrieve information of a file like, - The file size,
- Date of created/modified
- File name.
Is there any way that I can get these vital details other than using cut command?
Please suggest.
R.