shell - Linux不同用户执行find命令得到的结果不一样
迷茫
迷茫 2017-04-17 15:41:51
0
1
333

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

find / -user alex -print

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

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
PHPzhong

'-user alex' means "file is owned by user alex"

find / -user alex -print

The output is a file owned by alex, which is of course different from root.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!