How to grep output of ls -lhR / for particular owner (ex. root)?
find should answer:
sudo find / -user root
To search a specific directory, just replace /
with the full path. You can drop the sudo
part of the command if you don't mind warnings about being unable to read special files.
For group ownership finds, use:
sudo find / -group root
Related videos on Youtube
Tampa
Updated on September 18, 2022Comments
-
Tampa over 1 year
I am a zookeeper newbie. I have three nodes in three separate data centers. I will need to read and write data from the python pykeeper API? So...
1) which node to I read and write from? Does it matter? Round robin? Write to master, read from slaves?
2) How do I know wich server was elected as master? Do I care? That I have yet to figure out.
3) For now I am using the following to connect to zookeeper.
import zc.zk from random import choice zk_servers = ['111.111.111.111:2181','111.111.111.222:2181','111.111.111.333:2181'] zk = zc.zk.ZooKeeper(choice(zk_servers))
This begs the question, what if a zk node fails? Should I place nodes behind HA proxy to load-balance the requests?
Any advice for using best practice for reading and writing to zk nodes is mush appreciated.
Thanks
-
sbridges almost 12 yearsyou should probably start by reading the docs, zookeeper.apache.org/doc/r3.4.3/zookeeperOver.html
-
-
Huckle about 12 yearsI was going to suggest some hackery using cut and grep, but this is much cleaner.
-
Ztyx over 3 yearsThis comment isn't true. The same data resides on all nodes. It doesn't matter which data you request. As such, Zookeeper does not scale horizontally with respect to data. It does, however, scale horizontally in terms of reads.