find /usr -not (-user root -o user bin -o -user hadoop) -ls
时间: 2023-08-07 14:04:44 浏览: 43
这是一个在 `/usr` 目录下查找所有非属主为 `root`、`bin` 或 `hadoop` 的文件,并输出详细信息的命令。具体解释如下:
- `find`:查找命令。
- `/usr`:查找的起始目录。
- `-not`:逻辑非操作符,表示不满足以下条件。
- `(`:逻辑或操作符的开始括号。
- `-user root`:属主为 `root`。
- `-o`:逻辑或操作符,表示满足以下两个条件之一。
- `user bin`:属主为 `bin`。
- `-o`:逻辑或操作符,表示满足以下两个条件之一。
- `-user hadoop`:属主为 `hadoop`。
- `)`:逻辑或操作符的结束括号。
- `-ls`:输出详细信息,包括文件权限、属主、属组、文件大小、修改时间等。
因此,这个命令会在 `/usr` 目录下查找所有非属主为 `root`、`bin` 或 `hadoop` 的文件,并输出这些文件的详细信息。
相关问题
/usr/local/hadoop/bin/hdfs dfs -ls
该命令用于列出HDFS中指定路径下的所有文件和目录。具体用法如下:
```shell
/usr/local/hadoop/bin/hdfs dfs -ls <path>
```
其中,`<path>`为要列出的文件或目录的路径。如果不指定路径,则默认列出HDFS根目录下的所有文件和目录。例如,要列出HDFS根目录下的所有文件和目录,可以使用以下命令:
```shell
/usr/local/hadoop/bin/hdfs dfs -ls /
```
如果要列出/user/hadoop/input目录下的所有文件和目录,可以使用以下命令:
```shell
/usr/local/hadoop/bin/hdfs dfs -ls /user/hadoop/input
```
find /usr/bin -perm -1000
This command will search the directory /usr/bin and its subdirectories for files that have the setuid bit set. The setuid bit is a permission that allows a user to execute a file with the permissions of the file's owner, instead of the permissions of the user who is running the file.
The command is:
```
find /usr/bin -perm -1000
```
This will return a list of all files in /usr/bin and its subdirectories that have the setuid bit set. These files are typically important system files that need to be executed with elevated privileges, so it's important to understand which files have this permission and why.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)