LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 05:01 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

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, 05: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, 12:56 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
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 05:58 PM
Size occupied by a dir (with sub-dirs) chipotphe Linux - Newbie 3 11-15-2008 09:03 AM
samba, add dir, but dirs that's there are ro jo4 Linux - Server 1 01-17-2008 03:19 PM
hiccup: dirs off root showed up as files bdp Linux - Hardware 0 07-19-2002 12:38 PM
Cmd to rm dir thats has files and other dirs psyklops Linux - General 4 04-17-2002 08:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:35 AM.

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
Open Source Consulting | Domain Registration