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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To search files created by particular user or user ID 1

Status
Not open for further replies.

arjagadish

Technical User
Jan 6, 2003
36
IN
I have to search for files created by a particular user or user id.

Basically, I want to have a shell script for this.

 
thanks for sharing! [wink]

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.
#--------
vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Well, guess if I have to find &quot;*.c&quot; files created by a user. What would be the script.

 
1. man find
2. find <path2dir> -type f -user userName -name '*.c' vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top