简体   繁体   中英

Linux - finding hidden files that are executable by the owner using ls or find command

Well, as the post title says, I need to find the (only) Hidden files that are executable by the Owner using ls or find command.

I was able to get these.. A command to find all the executable files

find <dir> -executable -type f

And, this one's to find all the hidden files

find . ".*" -ls

So, I was able to find the hidden files and executables but I couldn't filter only the hidden files that are executable by the Owner.

You can try this find ,

find . -name '.*' -type f -perm /700

Explanation:

-perm /700 - find hidden files which is having executable by the owner.

只需结合它们:

find . -name '.*' -executable -type f

找到-type f -executeable -name“。*”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM