10+ commonly using find command switches with example Unix/L
发布时间:2021-01-24 12:11:40 所属栏目:Linux 来源:网络整理
导读:副标题#e# http://crybit.com/find-command-usage-with-example-unixlinux/ find command is one of the best search tool under UNIX/LINUX. Here I’m discussing some common switches of find command with detailed example. Like the name find,the
Example; # ll total 8 drwxrwxr-x 2 root root 4096 Sep 5 20:37 ./ drwxr-xr-x 34 root root 4096 Sep 5 19:52 ../ -rwxrwxrwx 1 root eclinux 0 Sep 5 20:37 test1234.txt* -rwx--x--x 1 root root 0 Sep 5 20:37 test1235.txt* -rw-rw-r-- 1 root root 0 Sep 5 20:38 test123.txt Run the command to change the permission. # find ./ -type f -exec chmod 777 {} ; # ll total 8 drwxrwxr-x 2 root root 4096 Sep 5 20:37 ./ drwxr-xr-x 34 root root 4096 Sep 5 19:52 ../ -rwxrwxrwx 1 root eclinux 0 Sep 5 20:37 test1234.txt* -rwxrwxrwx 1 root root 0 Sep 5 20:37 test1235.txt* -rwxrwxrwx 1 root root 0 Sep 5 20:38 test123.txt* the chmod command after -exec in find command change the file permission to 777. # find ./ -type f -exec rm -rf {} ; This will remove all files in the current working directory. I think this article gave some ideas about the usages of find command under UNIX/LINUX to you.Thank you for your time. More:,?,?,?,?,?,?,?,?,?,?,?,?, (编辑:应用网_丽江站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
站长推荐
热点阅读