MacOS & .DS_Store

.DS_Store === Desktop Services Store

https://en.wikipedia.org/wiki/.DS_Store

https://zh.wikipedia.org/wiki/.DS_Store

它是一种由苹果公司的Mac OS X操作系统所创造的隐藏文件,目的在于存贮文件夹的自定义属性,例如文件们的图标位置或者是背景色的选择等。

https://superuser.com/questions/47918/how-to-prevent-mac-os-x-creating-ds-store-files-on-non-mac-hfs-volumes

https://superuser.com/questions/757593/what-is-ds-store-file-in-windows

# ???

$  defaults write com.apple.desktopservices DSDontWriteNetworkStores YES

webpack 打包,自动删除 .DS_Store


$ sudo find / -name ".DS_Store" -depth -exec rm {} \;


How MACOs displays hidden files in Finder

  1. Command+Shift+. 可以显示隐藏文件、文件夹,再按一次,恢复隐藏;

  2. finder下使用Command+Shift+G 可以前往任何文件夹,包括隐藏文件夹。

https://zh.m.wikihow.com/显示Mac-OS-X上的隐藏文件和文件夹

Under the Mac OS X operating system, there are many settings for whether the hidden files of the system are displayed, and the simplest is to enter commands in the Mac terminal. The show/hide Mac hidden file command is as follows (note the spaces and case-sensitive ):

Command to display Mac hidden files: Defaults write com. Apple. Finder appleshowallfiles-bool true

Command to hide Mac hidden files: Defaults write com. Apple. Finder appleshowallfiles-bool false

Or

Command to display Mac hidden files: Defaults write com. Apple. Finder appleshowallfiles Yes

Command to hide Mac hidden files: Defaults write com. Apple. Finder appleshowallfiles No

After the input, click Enter to exit the terminal and restart the finder.

Tip: How to restart finder? Click the apple logo in the upper left corner of the window-> forced exit-> Finder-> restart.

How to hide and show your own files?

Hidden FILE command: chflags hidden file path

Remove Hidden commands: chflags nohidden file path


.DS_Store 是Mac OS保存文件夹的自定义属性的隐藏文件,如文件的图标位置或背景色,相当于 Windows 的 desktop.ini.

1: 禁止.DS_store生成, 打开“终端”, 复制黏贴下面的命令,回车执行,重启Mac即可生效;

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

2: 恢复.DS_store生成;

defaults delete com.apple.desktopservices DSDontWriteNetworkStores

https://www.zhihu.com/question/20345704

# 删除所有 .DS_Store 文件

sudo find / -name ".DS_Store" -depth -exec rm {} \;

https://github.com/xgqfrms/webpack-all-in-one/issues/2

MacOS & .DS_Store的更多相关文章

  1. ios 项目的.gitignore

    git作为代码管理工具,.gitignore文件用来忽略哪些哪些文件不用添加到仓库管理https://www.gitignore.io/ 这个网址输入变成语言会帮你生成常用的忽略文件如:IOS项目,输 ...

  2. Web应用程序的敏感信息-隐藏目录和文件

    Web应用程序的敏感信息-隐藏目录和文件 0x1.场景 Web应用程序根文件夹中可能存在大量隐藏信息:源代码版本系统文件夹和文件(.git,.gitignore,.svn),项目配置文件(.npmrc ...

  3. Mac下Git项目使用的.gitignore文件

    https://www.gitignore.io/ 这个网站可以搜索特定项目.系统所需要的.gitignore 我现在主要是在Mac上用Visual Studio Code进行开发,所以直接搜索Mac ...

  4. [macOS] git忽略所有的.DS_Store文件

    最彻底的方法如下: vi ~/.gitignore_global 输入以下内容 # OS generated files # ###################### .DS_Store .DS_ ...

  5. macOS 系统 .DS_Store 文件详解

    .DS_Store 文件 .DS_Store 是 Finder 用来存储这个文件夹的显示属性的:比如文件图标的摆放位置. 显示/隐藏 Mac 隐藏文件 显示:defaults write com.ap ...

  6. cornerstone忽略显示.DS_Store文件

    在MacOS上使用svn工具时,经常发现变化列表里出现一堆的?文件,.DS_Store,对有强迫症的人来说很郁闷.处理起来很简单,就是在svn的配置里忽略这个文件.#ue ~/.subversion/ ...

  7. TODO:macOS编译PHP7.1

    TODO:macOS编译PHP7.1 本文主要介绍在macOS上编译PHP7.1,有兴趣的朋友可以去尝试一下. 1.下载PHP7.1源码,建议到PHP官网下载纯净到源码包php-7.1.0.tar.g ...

  8. TODO:macOS上ThinkPHP5和Semantic-UI集成

    TODO:macOS上ThinkPHP5和Semantic-UI集成 1. 全局安装 (on OSX via homebrew)Composer 是 homebrew-php 项目的一部分 2. 把X ...

  9. CoreCRM 开发实录——Travis-CI 实现 .NET Core 程度在 macOS 上的构建和测试 [无水干货]

    上一篇文章我提到:为了使用"国货",我把 Linux 上的构建和测试委托给了 DaoCloud,而 Travis-CI 不能放着不用啊.还好,这货支持 macOS 系统.所以就把 ...

随机推荐

  1. SpringCloud-微服务网关ZUUL(六)

    前言:前面说过,由于微服务过多,可能某一个小业务就需要调各种微服务的接口,不可避免的就会需要负载均衡和反向代理了,以确保ui不直接与所有的微服务接口接触,所以我们需要使用一个组件来做分发,跨域等各种请 ...

  2. JavaScript中的null和undefined

    null :表示无值;undefined : 表示一个未声明的变量,                或已声明但没有赋值的变量,                或一个并不存在的对象属性. ==运算符将两 ...

  3. Python之元类详解

    一.引子 元类属于Python面向对象编程的深层魔法,99%的人都不得要领,一些自以为搞明白元类的人其实也是自圆其说,点到为止,从队元类的控制上来看就破绽百出,逻辑混乱: 二.什么是元类 一切源自于一 ...

  4. Python3的深拷贝和浅拷贝

    a = 1 b = a a = 2 print(a, b) print(id(a), id(b)) """ 运行结果 2 1 1445293568 1445293536 ...

  5. 在HTML中引用JavaScript中的变量

    和上次的代码几乎一样,但这次是引用已经写好的变量.主要功能和用法如下: document对象的getElementId方法得到HTML元素. HTML元素的value属性可以用来设置变量的值. 02. ...

  6. 六大iT公司的组织结构

  7. Go入门指南

    第一部分:学习 Go 语言 第1章:Go 语言的起源,发展与普及 1.1 起源与发展 1.2 语言的主要特性与发展的环境和影响因素 第2章:安装与运行环境 2.1 平台与架构 2.2 Go 环境变量 ...

  8. 图解 Go 并发

    你很可能从某种途径听说过 Go 语言.它越来越受欢迎,并且有充分的理由可以证明. Go 快速.简单,有强大的社区支持.学习这门语言最令人兴奋的一点是它的并发模型. Go 的并发原语使创建多线程并发程序 ...

  9. python3.6环境中django2.0与xadmin0.6结合的后台管理

    1.xadmin简介 django的admin管理后台页面很简洁,对个人来说做后台管理非常简单:xadmin的比较admin优化界面,看着也舒服. xadmin界面效果如下: 2.xadmin安装 从 ...

  10. unset命令详解

    基础命令学习目录首页 功能说明:unset是一个内建的Unix shell命令,在Bourne shell家族(sh.ksh.bash等)和C shell家族(csh.tcsh等)都有实现.它可以取消 ...