I want to find the files for certain users. I cant make the or condition work in this instance. I've tried the code below but it didnt worked. Any input on how to get the list for all files for this users.
find . -type f -user abc134 -o -user xyz345 -o bce483 -exec ls -ltr {} \;
If you want files in that format, you will have to push it out of the find command more like this:-
ls -lrt `find . -type f \( -user abc134 -o -user xyz345 -o bce483 \)`
It's probably bad programming practice as the command line might get too long. Here's an alternate:-
find . -type f \( -user abc134 -o -user xyz345 -o bce483 \) | xargs ls -lrt
....but that might not work for lots of files as it breaks the input into manageable chunks so you will get several runs of ls -lrt with lots of files. You could therefore get several blocks of output sorted, but there will not be a delimiting line between them.
As always - it depends, but on non-GNU systems I would probably use Perl for this task.
EDIT: Just noticed that some find implementations have the -ls option, so the list could be sorted by modification time.