OSX-始终隐藏某些文件 [英] OSX - always hide certain files

查看:97
本文介绍了OSX-始终隐藏某些文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在终端中显示和隐藏隐藏文件-但是当显示隐藏文件时,是否可以隐藏某些文件(例如.DS_STORE)?可以使某些文件超级隐藏吗?

I know how to show and hide hidden files in the Terminal - but is there a way to hide certain files like .DS_STORE when showing hidden files? Make certain files super-hidden, so to speak?

推荐答案

chflags与隐藏选项一起使用

即:chflags hidden fileToHide从查找"中隐藏文件

ie: chflags hidden fileToHide to hide the file from the Finde

chflags nohidden fileToHide显示文件

请记住手册页中的警告:

Please do keep in mind the warning in man page:

只有少数实用程序知道chflags.其中一些工具包括ls(1),cp(1),find(1),install(1),dump(8)和restore(8).特别是目前尚不支持chflags的工具是pax(1)实用工具.

Only a limited number of utilities are chflags aware. Some of these tools include ls(1), cp(1), find(1), install(1), dump(8), and restore(8). In particular a tool which is not currently chflags aware is the pax(1) utility.

这意味着,尽管您在Finder或打开/保存"对话框中看不到,但终端仍会看到它以及其他可能不遵守BSD标志的程序.

What that means is that while you won't see in the Finder or Open/Save dialog boxes, the Terminal will still see it and possibly other programs that don't respect BSD flags.

这篇关于OSX-始终隐藏某些文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆