如何检查是否存在隐藏文件

问题描述 投票:0回答:1

这是我的故事。 Adobe可以选择下载字体,这对我们行业来说是个问题。我找到了这些文件的位置,现在我想创建一个Jamf Smart组来检查是否已下载字体。

文件位置是:/ Users / $ loggedInUser / Library / Application \ Support / Adob​​e / CoreSync / plugins / livetype / .r /

文件名是数字的组合。例如:.33805.otf

这是用于MacOS

到目前为止,我有以下内容,但它不起作用。我不断收到错误的输出。

USERS="`ls /Users | grep -v "Shared"`" 

for Adobe in $USERS; do
    if  [[ -a "/Users/$Adobe/Library/Application\ Support/Adobe/CoreSync/plugins/livetype/.r/.[^.]*otf"  ]]  ; then
              echo "True"
    else
              echo "False"
    fi
done
bash if-statement wildcard hidden hidden-files
1个回答
0
投票

只是一个快速的帖子,我赶时间。

for adobe in /users/*; do
       [[ $adobe == *Shared* ]] && continue
    # do the rest of the stuff here

    done
© www.soinside.com 2019 - 2024. All rights reserved.