find /user/stc/tmp -mmin -200 -ls | grep '.txt' | awk '{print $8, $9, $10, $11}' >> tempresult.txt
First of all I am a newbie, I am trying to find out ONLY .txt files modified in last week(in home/user/temp) and save the result to a file. so some how i figured it out, but I need help with to save only file name without path. I can print it with
awk '{print \$NF}'
but when i try that in combination with above command It's not working as expected.
Any help/suggestion/Improvement is highly appreciated. Thank you in advance.