Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fetching files

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need to find all files with the name of the person who owns the file.

ls -l gives me:

-rw-r--r-- 1 smith mygroup 58 Dec 4 2001 zy


I want to get all files with the smith name:

find . \(grep smith\) -exec ls {}\;

This is not working. Any suggestions??
 
man find

-user uname
True if the file belongs to the user uname. If
uname is numeric and does not appear as a login
name in the /etc/passwd file, it is taken as a
user ID.


find . -user user2find

vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
 
This should work for you:


find . -exec ls -l {} \; | grep smith
=================
Bad Company Music
=================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top