1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WindowsからMacにファイルを持っていくと勝手に実行フラグがつくので消す

Posted at

背景

Windowsで作業しているファイルを(例えばUSBメモリなどを介して)Macに持って行くと、何故か実行フラグが付いている。
ls -alした時に赤く表示されるのはそれ。

パスを通さないかぎり問題は無いかもしれないけど、気持ち悪いので消したい。

方法

ディレクトリは実行フラグを残しておかないと開けないので、
ファイルはパーミッションを644、ディレクトリは755にする。

cd (対象のディレクトリ)
find . -type f -exec chmod 644 {} ";"
find . -type d -exec chmod 755 {} ";"

でまとめて修正。


他に考慮すべき点などあれば、コメント下さい。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?