我正在试图找出要做文件操作的通配符.
我将这些文件放在目录中以进行测试:
file_BSD.GIF file_linux.gif file_unix
Run Code Online (Sandbox Code Playgroud)
看我的ls命令,
$ ls *{.GIF,.gif}
file_BSD.GIF file_linux.gif
Run Code Online (Sandbox Code Playgroud)
哪个可以.
但"查找"似乎没有同样的方式:
$ find -name *{.GIF,.gif}
find: paths must precede expression: file_linux.gif
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
Run Code Online (Sandbox Code Playgroud)
顺便说一句,我已经读过"-iname"应该找到大写和小写文件,但这似乎也不起作用:
$find -iname *.gif
./file_linux.gif
Run Code Online (Sandbox Code Playgroud)
(这也应该找到.GIF文件,对吧?).
我想阻止用户修改文件,但我似乎无法使用标准权限使其工作.
该文件file.jpg位于文件夹中2012/.
文件详情:
-r--r--r-- 1 root root 10294 Feb 19 2013 file.jpg
Run Code Online (Sandbox Code Playgroud)
文件夹细节:
drwxr-xr-x 2 charly charly 36864 Aug 27 15:38 2012/
Run Code Online (Sandbox Code Playgroud)
我的目的是阻止用户重命名文件,但具有权限,因为他们能够.
我错过了什么?