(I know this is an old message in my email, but I show no replies to it,
so here you go.)
the find command has its own -ls argument,
so depending on how your distribution is configured,
one of the following should work for you:
su -c 'find / ! -user root -ls 2>/dev/null'
or
sudo 'find / ! user root -ls 2>/dev/null'
-------------------
NOTE:
Since you're accessing the find command as root, tossing errors away
(2>/dev/null) is probably not necessary, but this was a good opportunity
to demonstrate its use.
Executing the same command as a regular user would yield all kinds of
permission denied errors, not to mention that the results would be
inaccurate since the user logged in should not be able to access other
users files, yielding a grossly incomplete list of user files--not what
you want!
----------------
Hope this helps someone out there.
John
Joey wrote:
hello everyone:
I tried to use this command:
find / ! -user root -exec ls -l {} \;
but the result is wrong
instead when I type:
find / ! -user root
the result is right.
where should I change to make "-exec ls" work?
Joey
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at
http://groups.google.com/group/linuxusersgroup
-~----------~----~----~----~------~----~------~--~---
--
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at
http://groups.google.com/group/linuxusersgroup