当前位置:新励学网 > 秒知问答 > linuxfind命令详解

linuxfind命令详解

发表时间:2024-07-15 23:26:31 来源:网友投稿

1、查找当前路径名字叫“hello.txt”的文件:

用法:find./-name文件名全程

例如:find./-namehello.txt

[root@test~]#ls

anaconda-ks.cfgexample.txthello.txt

[root@test~]#find./-namehello.txt

./hello.txt

批量查找名为hello的文件:

find./-namehel*

“*”为模糊匹配

[root@test~]#find./-namehel*

./hello.txt

2、查找根目录名字叫“hello.txt”的文件:

用法:find/-name文件名全程

例如:find/-namehello.txt

[root@test~]#find/-namehello.txt

/root/hello.txt

3、查找删除名为“hello.txt”文件:

用法:find./-name文件名|xargsrm

例如:find./-namehello.txt|xargsrm

免责声明:本站发布的教育资讯(图片、视频和文字)以本站原创、转载和分享为主,文章观点不代表本网站立场。

如果本文侵犯了您的权益,请联系底部站长邮箱进行举报反馈,一经查实,我们将在第一时间处理,感谢您对本站的关注!