V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
shihty5
V2EX  ›  Linux

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

  •  
  •   shihty5 · 2014-08-08 16:21:12 +08:00 · 4482 次点击
    这是一个创建于 3567 天前的主题,其中的信息可能已经有所发展或是发生改变。
    求助

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

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

    Thanks.
    5 条回复    2014-08-08 17:05:59 +08:00
    Zuckonit
        1
    Zuckonit  
       2014-08-08 16:22:56 +08:00
    find
    gerorim
        2
    gerorim  
       2014-08-08 16:35:02 +08:00 via Android   ❤️ 1
    Syntax:

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

    ```
    find {directory-location} -user {user_name} -perm -u=r -ls
    ```
    shihty5
        5
    shihty5  
    OP
       2014-08-08 17:05:59 +08:00
    @gerorim 感谢已送达。 谢谢。现在正在遍历中。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1191 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 18:41 · PVG 02:41 · LAX 11:41 · JFK 14:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.