Heim  >  Fragen und Antworten  >  Hauptteil

shell - Linux不同用户执行find命令得到的结果不一样

用root身份从/搜索属于alex文件只有很少记录,用alex身份从/搜的话则有许多记录,命令如下

find / -user alex -print

为什么这样子?是因为root对某些属于alex的文件夹没有读和执行权限吗?我用root怎样才能得到和用alex一样的搜索结果呢

迷茫迷茫2714 Tage vor312

Antworte allen(1)Ich werde antworten

  • PHPz

    PHPz2017-04-17 15:43:51

    '-user alex' 的含义是 "file is owned by user alex"

    find / -user alex -print

    输出的是 alex 拥有的文件, 当然和root不一样。

    Antwort
    0
  • StornierenAntwort