How to grep output of ls -lhR / for particular owner (ex. root)?

437

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
Share:
437

Related videos on Youtube

Tampa
Author by

Tampa

Updated on September 18, 2022

Comments

  • Tampa
    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

  • Huckle
    Huckle about 12 years
    I was going to suggest some hackery using cut and grep, but this is much cleaner.
  • Ztyx
    Ztyx over 3 years
    This 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.