sudo find /filename/ -name ".svn" -exec rm -r {} \\;
touch -t 201112310101 /Volumes/MacHD/Pictures/somefile.jpg
/touch -mt 201112310101 /Volumes/MacHD/Pictures/somefile.jpg
/Users/mars/Music/iTunes/iTunes Media/Mobile Applications/影之刃 1.0.2.ipa
若~
目录下没有.bash_profile
,则需创建.bash_profile
:
cd ~
touch .bash_profile
文件: ~/.bash_profile
.
2.
新建一个管理员账户来更改原有用户账户密码
开机,启动时按cmd+S,进入Single User Mode,在: root#下 输入 mount -uaw 回车,
完成后,输入rm -rf /var/db/.AppleSetupDone按下回车键,如果没有任何报错信息,则表明执行成功。
输入reboot重新启动。你会发现,熟悉的初始界面又回来了,别担心,东西全没丢。就像第一次安装一样,重新建立一个新的管理员账号。在新的管理员下打开 用户与群组,打开最下面的锁,问密码时,用新的管理员的帐号的密码。你会看到至少两个账号,新的管理员的帐号和你原来的帐号,点中原来的账号,选择更改密码。 你不必有原先的密码就直接可以设新密码。
点下面的登陆选项 ,自动登录选中你原先的账号,重启即可。
OK,大功告成。如果你不喜欢机器多出一个账号,删除你新建的管理员账户。
若回到原管理员账户中出现 "CalenderAgent"想使用本地项目"钥匙串"
From:
1、打开 OS X Finder,然后选择“前往”→“前往文件夹”
2、在出现的窗口中输入“~/Library/Keychains/”(无双引号)
3、在打开的窗口中寻找名字类似“A8F5E7B8-CEC1-4479-A7DF-F23CB076C8B8”的文件夹(格式类似,不一定与例子对应)
4、将该文件夹移动到废纸篓中
5、马上重启电脑
终端->偏好设置->描述文件->shell->运行命令
. ~/.bash_profile
方法1:
Changes文件夹中还有个文件。 直接删除Changes文件夹即可。
方法2:
先将系统时间修改为未来某一日期(如2022年)
然后执行如下命令:
sudo touch -t 202212310101 /Users/mars/Library/Application\ Support/Changes/.cacheSettings2
打开目录文件
sudo open ~/Library/Preferences/com.apple.HIToolbox.plist
删除AppleEnabledInputSources下的除sougou外的其他所有输入法即可。(拷贝一份备份,并设置为锁定,然后替换文件)
必须在一台有账号密码的mac上导出带密码的.cer和.p12,.mobileprovision文件。
若原来有一台mac已经设了development证书,新mac要么reset原来的证书要么必须从原来mac导出证书才能正常使用
changes
yoink
appcleaner
medis
brew install you-get
you-get https://www.kugou.com/song/#hash=CC2A8C0AC94EA487AF37609A98281BA8&album_id=31478093
ssh -p 端口号 服务器用户名@ip (eg:ssh -p 22 root@119.1.3.63)
打开~/.ssh/config
设置:
Host "xxxx"
ProxyCommand nc -X 5 -x 127.0.0.1:1086 %h %p
.DS_Store
# 关闭finder再执行命令
find . -name '.DS_Store' -type f -delete
Solution: 开vpn,或者vpn没生效
擦除可用空间:
diskutil secureErase freespace 4 /Volumes/U_Disk
安全删除文件
## delete a single file
rm -Pv wikileak1.txt
## delete a folder recursively
rm -Pvrf ~/.wikileaks
open ~/Library/Containers/com.microsoft.Excel/Data/Library/Preferences
export http_proxy=http://127.0.0.1:1087;export https_proxy=http://127.0.0.1:1087
pkill -f Sublime\ Text
pkill -a Terminal
把电脑电源线拔插一下
https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
正在解析主机 raw.githubusercontent.com (raw.githubusercontent.com)... 0.0.0.0
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|0.0.0.0|:443... 已连接。
警告: 无法验证 raw.githubusercontent.com 的由 “CN=TrustAsia TLS RSA CA,OU=Domain Validated SSL,O=TrustAsia Technologies\\, Inc.,C=CN” 颁发的证书:
Solution:
ipaddress.com查询raw.githubusercontent.com对应ip
/etc/host添加`185.199.108.133 raw.githubusercontent.com`
使用vpn
mac m1 c compiler cannot create executables
xcode-select --install
bash: syntax error near unexpected token
More$ echo some (parentheses)
bash: syntax error near unexpected token `('
$ echo 'some (parentheses)'
some (parentheses)
XXX.app 已损坏,打不开。您应该将它移到废纸篓
sudo spctl --master-disable
sudo chown -R marstau /usr/local
路上颠簸导致macbook pro开机后一直卡住,重装电脑还是一样的
只是如此操作后,电池可以充电,但是电量一直显示0%
经查是主板坏了,换了主板的一个电子元件。
Read-only file system
sudo mount -uw /
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
若安装太卡顿More
把https://github.com/Homebrew/homebrew-core.git
import到gitee.com
git clone git@gitee.com:yourusername/homebrew-core.git /opt/homebrew/Library/Taps/homebrew/homebrew-core
brew update
服务未启动:
mysql.server restart
sudo -S reboot < password.file
使用Apple Configurator 2点击添加对应ios软件(事先下载好ios软件),当提示已存在xxx的应用是否替换的时候,mac上已缓存了对应ipa文件:
~/Library/Group Containers/K36BKF7T3D.group.com.apple.configurator/Library/Caches/Assets/TemporaryItems/MobileApps
user id是高级选项中的user id, 当前账号必须为管理员
sudo launchctl bootout user/$(id -u <user id>)
source test.sh
Terminal->preferences->描述文件->窗口->取消勾选 重新打开窗口时恢复文本
下载iMazing Profile Editor编辑下载的.mobleconfig文件,把Enable Notifications的勾去掉即可。
ln: jre: Operation not permitted
ln -s jbr jre #报错
Solution:
Go to System Settings
-> Privacy & Security
-> App Management
and Terminal
as in the list of apps allowed to make changes under Applications folder.
####