Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
peterontheway
V2EX  ›  Linux

Linux 中如何查看某个用户(用户组)所拥有的所有文件夹和文件?

  •  
  •   peterontheway · Aug 8, 2014 · 5112 views
    This topic created in 4371 days ago, the information mentioned may be changed or developed.
    求助

    因为这是一台新server,SA又在美国,现在不好问。
    能查到我的ID所在的组,但是现在想查看哪些文件夹我可以ACCESS?

    P.S 我没有自己的Home Directory.

    Thanks.
    5 replies    2014-08-08 17:05:59 +08:00
    Zuckonit
        1
    Zuckonit  
       Aug 8, 2014
    find
    gerorim
        2
    gerorim  
       Aug 8, 2014 via Android   ❤️ 1
    Syntax:

    ```
    find directory-location -group {group_name} -user {user_name
    ```
    后面加限定条件 -type f 仅回显文件, -type d 则只查找目录。
    nicai000
        3
    nicai000  
       Aug 8, 2014
    这只能遍历一遍了...
    gerorim
        4
    gerorim  
       Aug 8, 2014 via Android   ❤️ 1
    额,下面这个命令会准确一些。

    ```
    find {directory-location} -user {user_name} -perm -u=r -ls
    ```
    peterontheway
        5
    peterontheway  
    OP
       Aug 8, 2014
    @gerorim 感谢已送达。 谢谢。现在正在遍历中。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2765 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:17 · PVG 23:17 · LAX 08:17 · JFK 11:17
    ♥ Do have faith in what you're doing.