Computing.Net > Forums > Unix > grep to get file name details

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

grep to get file name details

Reply to Message Icon

Name: sunilmyneedi
Date: November 30, 2006 at 08:16:56 Pacific
OS: unix
CPU/Ram: none
Product: none
Comment:

i am trying to grep for the files having string " failure" in the entire directory.for that i am using grep -l "FAILURE" , this will give only the file name only .. but i need all the details like date when it is created ,owner etc .. similar to what we get when we give ls -ltr



Sponsored Link
Ads by Google

Response Number 1
Name: rais
Date: November 30, 2006 at 08:52:52 Pacific
Reply:

You can do: ls -al `grep -l "FAILURE" *`

Thanks.
The Network Dept.



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: grep to get file name details

How to get latest updated file in a folder www.computing.net/answers/unix/how-to-get-latest-updated-file-in-a-folder/8497.html

Shell script to find files www.computing.net/answers/unix/shell-script-to-find-files/5440.html

script to change file names www.computing.net/answers/unix/script-to-change-file-names/8327.html