The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-07-2008
ramu_indian ramu_indian is offline
Registered User
 

Join Date: May 2008
Posts: 5
Need to store information relating to certain files

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,
  1. The file size,
  2. Date of created/modified
  3. File name.

Is there any way that I can get these vital details other than using cut command?

Please suggest.

R.
Reply With Quote
Forum Sponsor