Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
unix find在SMB共享的path参数上不区分大小写_Unix_Find_Smb - Fatal编程技术网

unix find在SMB共享的path参数上不区分大小写

unix find在SMB共享的path参数上不区分大小写,unix,find,smb,Unix,Find,Smb,(在OSX 10.14和ubuntu 14下测试) !!路径和文件夹位于SMB共享上 我希望确保路径完全按照写入的方式存在,但当路径中的字符大小写错误时会出现问题 该查找返回最终文件夹存在,尽管部分路径“大小写错误” 例如: 给定一个文件夹作为:/path/to/tHe/important/folder(大写字母“H”表示“tHe”) 将返回正确答案: /path/to/tHe/important/folder 但是下一个“find命令”也可以工作,并报告由提供的参数掩盖的错误路径(“the”中

(在OSX 10.14和ubuntu 14下测试)

!!路径和文件夹位于SMB共享上

我希望确保路径完全按照写入的方式存在,但当路径中的字符大小写错误时会出现问题

该查找返回最终文件夹存在,尽管部分路径“大小写错误”

例如:

给定一个文件夹作为:
/path/to/tHe/important/folder
(大写字母“H”表示“tHe”)

将返回正确答案:

/path/to/tHe/important/folder

但是下一个“find命令”也可以工作,并报告由提供的参数掩盖的错误路径(“the”中的小写“h”)

/path/to/the/important/folder

如何检查路径和最终文件夹是否确实以书面形式存在(区分大小写)

谢谢


注意:
test=“/path/to/the/important/folder”;[[-f“$test”]| |返回1
以及
ls${test}>/dev/null | |返回1具有相同的不区分大小写的行为。

Samba问题的站点错误,编程问题的站点错误。做一些研究,Samba linux和windows的信息比比皆是,您可以尝试多种解决方案。
find /path/to/tHe/important -mindepth 1 -maxdepth 1 -type d -name folder
find /path/to/the/important -mindepth 1 -maxdepth 1 -type d -name folder