LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-31-2010, 06:01 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,208

Rep: Reputation: Disabled
Question How to find root files and dirs in some dir?


For example I have "/some/dir" which contains user's files and directories. I want to check if there are any files or directories of root. I guess I should use "find" command but what's the full command to find it out?
 
Old 10-31-2010, 06:07 AM   #2
PehJota
Member
 
Registered: Aug 2010
Distribution: Desktop and netbook: Debian Squeeze; Router: DD-WRT
Posts: 43

Rep: Reputation: 5
Quote:
Originally Posted by Manual page find(1)
Code:
       -uid n File's numeric user ID is n.

       -user uname
              File is owned by user uname (numeric user ID allowed).
So you would use `find /some/dir -user root`.
 
1 members found this post helpful.
Old 11-01-2010, 01:56 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
If you're don't have too many levels to check, 'ls -l' will do for a human. Use 'find' if you want to process the output.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy svn working dir without svn hidden dirs and files? erinspice Linux - Software 4 03-29-2011 06:58 PM
Size occupied by a dir (with sub-dirs) chipotphe Linux - Newbie 3 11-15-2008 10:03 AM
samba, add dir, but dirs that's there are ro jo4 Linux - Server 1 01-17-2008 04:19 PM
hiccup: dirs off root showed up as files bdp Linux - Hardware 0 07-19-2002 01:38 PM
Cmd to rm dir thats has files and other dirs psyklops Linux - General 4 04-17-2002 09:12 PM


All times are GMT -5. The time now is 05:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration