标签: directory find printf
寻找一种打印不带.file的文件夹的方法。
find -iname file -printf '%h\n'给出./directory
find -iname file -printf '%h\n'
./directory
find -iname file -printf '%P\n'给出/directory/file
find -iname file -printf '%P\n'
/directory/file
我需要/directory
/directory