Hi All,
Sample records
HTML Code:
2157 91128 -rw-r----- 1 arun1 staff 93315072 Aug 23 06:44 /home/arun/my own/file_name.txt
2157 91128 -rw-r----- 1 arun1 staff 93315072 Aug 23 06:44 /home/arun/myown/file name2.txt
i want to print only user name, user group, size, date time stamp, and full file name including the path.
In the sample record we can see 11th field contains file path and name in it with spaces in directory name and also file name, and all the fields are also delimited with spaces naturally.
I used:
HTML Code:
find /home/arun -type f -name "*.txt*" -mtime +90 -ls 2>/dev/null | awk '{print $5","$7","$8,$9,$10","$11}
inorder to print 11th field (with space) but i am getting
arun1,93315072,Aug 23 06:44,/home/arun/my
arun1,93315072,Aug 23 06:44,/home/arun/myown/file
you can see 11th field is cut down since it has space... i used \"$11\" also in awk but not helping me.
I am expecting the output like below:
HTML Code:
arun1,93315072,Aug 23 06:44,/home/arun/my own/file_name.txt
arun1,93315072,Aug 23 06:44,/home/arun/myown/file name2.txt
Please help.
Thanks in advance!