nmtysh.log

Tech系のネタや日々の独り言などを書いています。

MacにHomebrewでComposerをインストールする(備忘録)

※この記事はQiitaにも投稿しています。

Atomからphpmdを呼び出して自動チェックさせたりするついでにComposerも導入して仮想マシンを経由せずにMac上で直接使える様にしてみました。

0. 環境

1. Install

$ brew install Composer
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
infer
Error: No available formula with the name "composer"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
These formulae were found in taps:
homebrew/completions/composer-completion  homebrew/php/composer
To install one of them, run (for example):
  brew install homebrew/completions/composer-completion

パッケージ名が違ってた。 composer-completion もあるようなのでついでにインストールする。

$ brew install homebrew/php/composer homebrew/completions/composer-completion
==> Tapping homebrew/php
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-php'...
remote: Counting objects: 642, done.
remote: Compressing objects: 100% (395/395), done.
remote: Total 642 (delta 345), reused 499 (delta 245), pack-reused 0
Receiving objects: 100% (642/642), 303.89 KiB | 213.00 KiB/s, done.
Resolving deltas: 100% (345/345), done.
Checking connectivity... done.
Tapped 617 formulae (657 files, 1.2M)
==> Tapping homebrew/completions
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-completions'...
remote: Counting objects: 41, done.
remote: Compressing objects: 100% (36/36), done.
remote: Total 41 (delta 8), reused 21 (delta 5), pack-reused 0
Unpacking objects: 100% (41/41), done.
Checking connectivity... done.
Tapped 36 formulae (101 files, 67.9K)
==> Installing composer from homebrew/php
==> Installing dependencies for homebrew/php/composer: libpng, freetype, icu4c, jpeg, libxml2, unixodbc, readline, php70
==> Installing homebrew/php/composer dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.24.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libpng-1.6.24.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/libpng/1.6.24: 26 files, 1.2M
==> Installing homebrew/php/composer dependency: freetype
==> Downloading https://homebrew.bintray.com/bottles/freetype-2.6.5.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring freetype-2.6.5.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/freetype/2.6.5: 61 files, 2.5M
==> Installing homebrew/php/composer dependency: icu4c
==> Downloading https://homebrew.bintray.com/bottles/icu4c-57.1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring icu4c-57.1.el_capitan.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

OS X provides libicucore.dylib (but nothing else).

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/icu4c/lib
    CPPFLAGS: -I/usr/local/opt/icu4c/include

==> Summary
🍺  /usr/local/Cellar/icu4c/57.1: 265 files, 65.0M
==> Installing homebrew/php/composer dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-8d.el_capitan.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring jpeg-8d.el_capitan.bottle.2.tar.gz
🍺  /usr/local/Cellar/jpeg/8d: 19 files, 713.8K
==> Installing homebrew/php/composer dependency: libxml2
==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.4.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libxml2-2.9.4.el_capitan.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/libxml2/lib
    CPPFLAGS: -I/usr/local/opt/libxml2/include

==> Summary
🍺  /usr/local/Cellar/libxml2/2.9.4: 276 files, 9.8M
==> Installing homebrew/php/composer dependency: unixodbc
==> Downloading https://homebrew.bintray.com/bottles/unixodbc-2.3.4.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring unixodbc-2.3.4.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/unixodbc/2.3.4: 39 files, 952.4K
==> Installing homebrew/php/composer dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-6.3.8.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring readline-6.3.8.el_capitan.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.

OS X provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.


Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/readline/lib
    CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
🍺  /usr/local/Cellar/readline/6.3.8: 46 files, 2.0M
==> Installing homebrew/php/composer dependency: php70
==> Downloading https://homebrew.bintray.com/bottles-php/php70-7.0.10_1.el_capitan.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring php70-7.0.10_1.el_capitan.bottle.1.tar.gz
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php7_module    /usr/local/opt/php70/libexec/apache2/libphp7.so

    <FilesMatch .php$>
        SetHandler application/x-httpd-php
    </FilesMatch>

Finally, check DirectoryIndex includes index.php
    DirectoryIndex index.php index.html

The php.ini file can be found in:
    /usr/local/etc/php/7.0/php.ini

✩✩✩✩ Extensions ✩✩✩✩

If you are having issues with custom extension compiling, ensure that
you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:

      PATH="/usr/local/bin:$PATH"

PHP70 Extensions will always be compiled against this PHP. Please install them
using --without-homebrew-php to enable compiling against system PHP.

✩✩✩✩ PHP CLI ✩✩✩✩

If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,
~/.zshrc, ~/.profile or your shell's equivalent configuration file:

      export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"

✩✩✩✩ FPM ✩✩✩✩

To launch php-fpm on startup:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/opt/php70/homebrew.mxcl.php70.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php70.plist

The control script is located at /usr/local/opt/php70/sbin/php70-fpm

OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:

  PATH="/usr/local/sbin:$PATH"

You may also need to edit the plist to use the correct "UserName".

Please note that the plist was called 'homebrew-php.josegonzalez.php70.plist' in old versions
of this formula.

To have launchd start homebrew/php/php70 now and restart at login:
  brew services start homebrew/php/php70
==> Summary
🍺  /usr/local/Cellar/php70/7.0.10_1: 332 files, 49.5M
==> Installing homebrew/php/composer
==> Downloading https://homebrew.bintray.com/bottles-php/composer-1.2.0.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring composer-1.2.0.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/composer/1.2.0: 4 files, 1.6M
==> Installing composer-completion from homebrew/completions
==> Downloading https://gist.githubusercontent.com/tonglil/753d59d6d649f85600fe/raw/854fcb2f5a4cae824119d6c5c40a2bde4e541689/composer-completion.sh
######################################################################## 100.0%
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
🍺  /usr/local/Cellar/composer-completion/1: 2 files, 1.1K, built in 3 seconds

2. 依存関係

手元の環境だと composer の依存関係で下記まで入ってきた……(phpもなのか……)

  • libpng
  • freetype
  • icu4c
  • jpeg
  • libxml2
  • unixodbc
  • readline
  • php70

依存関係はこんな感じ。

$ brew deps --tree composer
homebrew/php/composer (required dependencies)
└── :php70

$ brew deps --tree php70
homebrew/php/php70 (required dependencies)
└── :postgresql
├── freetype
│   └── libpng
│       └── xz
├── gettext
│   └── xz
├── icu4c
├── jpeg
├── libpng
│   └── xz
├── libxml2
│   └── :python
├── unixodbc
├── readline
└── openssl
    └── makedepend
        └── pkg-config

やはりケース側が悪そうな……

nmtysh.hatenablog.com

箱を入れ替えてみてデータ転送を行ってみましたが特にエラーが出ていなかったので箱が怪しそうです。

外付けHDDの健康状態も気になるのでWindows環境に接続してCrystalDiskInfoで見てみることにしました。
故障が疑わしい箱ではS.M.A.R.T.情報が取得できたのですが(HDDは健康判定)、エラーのでない箱はS.M.A.R.T.の情報取得に対応せず……
とほほ。

ただいくら外付けHDDとして使っていたからと言って5年以上の使用年数でこの稼働時間は短いのでは? と気になりました。
電源ON/OFF回数も数百のオーダーしかなく「あれ? こんなものなの?」という感じです。

この調子だと壊れるのだいぶ先立ったんじゃ……

DesktopPCで使っている内蔵HDDも電源ON経過時間が約1年10ヶ月。電源ON/OFFは1万弱。
会社で使うPCと違って平日の稼働時間は少ないからこんなものなんですかね。
とはいえ、だいぶ昔に不良セクタが1つ出たのが気がかりではありますが……(それ以降増えてない)

なんにせよデータは複数の場所(機器)にバックアップしておくに越したことはないですね。

もしかして壊れかけている?

Macでうまく書き込めないのでUbuntuに繋いで0フォーマットを実施しているのだけれど、遅々として進まない。
気になってログを見てみたら気になるログがチラホラと。
もしかして、壊れかけなのか?

箱を変えて、コントローラーが悪いのかHDDそのものが悪いのか見てみるか…

Aug 11 18:11:01 ubuntu kernel: [   85.884046] ata1.00: exception Emask 0x10 SAct 0x4000003e SErr 0x280100 action 0x6 frozen
Aug 11 18:11:01 ubuntu kernel: [   85.884052] ata1.00: irq_stat 0x08000000, interface fatal error
Aug 11 18:11:01 ubuntu kernel: [   85.884055] ata1: SError: { UnrecovData 10B8B BadCRC }
Aug 11 18:11:01 ubuntu kernel: [   85.884058] ata1.00: failed command: READ FPDMA QUEUED
Aug 11 18:11:01 ubuntu kernel: [   85.884063] ata1.00: cmd 60/88:08:d8:e0:15/00:00:02:00:00/40 tag 1 ncq 69632 in
Aug 11 18:11:01 ubuntu kernel: [   85.884063]          res 50/00:00:a0:3b:71/00:01:00:00:00/40 Emask 0x10 (ATA bus error)
Aug 11 18:11:01 ubuntu kernel: [   85.884066] ata1.00: status: { DRDY }
Aug 11 18:11:01 ubuntu kernel: [   85.884069] ata1.00: failed command: READ FPDMA QUEUED
Aug 11 18:11:01 ubuntu kernel: [   85.884074] ata1.00: cmd 60/08:10:a0:79:8b/00:00:02:00:00/40 tag 2 ncq 4096 in
Aug 11 18:11:01 ubuntu kernel: [   85.884074]          res 50/00:00:a0:3b:71/00:01:00:00:00/40 Emask 0x10 (ATA bus error)
Aug 11 18:11:01 ubuntu kernel: [   85.884076] ata1.00: status: { DRDY }
Aug 11 18:11:01 ubuntu kernel: [   85.884079] ata1.00: failed command: READ FPDMA QUEUED
Aug 11 18:11:01 ubuntu kernel: [   85.884084] ata1.00: cmd 60/d0:18:80:3c:47/00:00:01:00:00/40 tag 3 ncq 106496 in
Aug 11 18:11:01 ubuntu kernel: [   85.884084]          res 50/00:00:a0:3b:71/00:01:00:00:00/40 Emask 0x10 (ATA bus error)
Aug 11 18:11:01 ubuntu kernel: [   85.884086] ata1.00: status: { DRDY }
Aug 11 18:11:01 ubuntu kernel: [   85.884088] ata1.00: failed command: READ FPDMA QUEUED
Aug 11 18:11:01 ubuntu kernel: [   85.884093] ata1.00: cmd 60/00:20:a0:3a:71/01:00:00:00:00/40 tag 4 ncq 131072 in
Aug 11 18:11:01 ubuntu kernel: [   85.884093]          res 50/00:00:a0:3b:71/00:01:00:00:00/40 Emask 0x10 (ATA bus error)
Aug 11 18:11:01 ubuntu kernel: [   85.884096] ata1.00: status: { DRDY }
Aug 11 18:11:01 ubuntu kernel: [   85.884098] ata1.00: failed command: READ FPDMA QUEUED
Aug 11 18:11:01 ubuntu kernel: [   85.884103] ata1.00: cmd 60/00:28:a0:3b:71/01:00:00:00:00/40 tag 5 ncq 131072 in
Aug 11 18:11:01 ubuntu kernel: [   85.884103]          res 50/00:00:a0:3b:71/00:01:00:00:00/40 Emask 0x10 (ATA bus error)
Aug 11 18:11:01 ubuntu kernel: [   85.884106] ata1.00: status: { DRDY }
Aug 11 18:11:01 ubuntu kernel: [   85.884108] ata1.00: failed command: READ FPDMA QUEUED
Aug 11 18:11:01 ubuntu kernel: [   85.884113] ata1.00: cmd 60/08:f0:b8:c2:8b/00:00:02:00:00/40 tag 30 ncq 4096 in
Aug 11 18:11:01 ubuntu kernel: [   85.884113]          res 50/00:00:a0:3b:71/00:01:00:00:00/40 Emask 0x10 (ATA bus error)
Aug 11 18:11:01 ubuntu kernel: [   85.884116] ata1.00: status: { DRDY }
Aug 11 18:11:01 ubuntu kernel: [   85.884119] ata1: hard resetting link
Aug 11 18:11:01 ubuntu kernel: [   86.376042] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Aug 11 18:11:01 ubuntu kernel: [   86.378375] ata1.00: configured for UDMA/133
Aug 11 18:11:01 ubuntu kernel: [   86.392044] ata1: EH complete
Aug 11 18:13:05 ubuntu kernel: [  210.032149] usb 10-1: new SuperSpeed USB device number 2 using xhci_hcd
Aug 11 18:13:05 ubuntu kernel: [  210.051838] usb 10-1: New USB device found, idVendor=152d, idProduct=0567
Aug 11 18:13:05 ubuntu kernel: [  210.051841] usb 10-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 11 18:13:05 ubuntu kernel: [  210.051843] usb 10-1: Product: USB to ATA/ATAPI Bridge
Aug 11 18:13:05 ubuntu kernel: [  210.051845] usb 10-1: Manufacturer: JMicron
Aug 11 18:13:05 ubuntu kernel: [  210.051846] usb 10-1: SerialNumber: 0123456789ABCDEF
Aug 11 18:13:06 ubuntu kernel: [  210.630887] usbcore: registered new interface driver usb-storage
Aug 11 18:13:06 ubuntu kernel: [  210.646953] scsi host6: uas
Aug 11 18:13:06 ubuntu kernel: [  210.647094] usbcore: registered new interface driver uas
Aug 11 18:13:06 ubuntu kernel: [  210.647556] scsi 6:0:0:0: Direct-Access     JMicron  Generic          9201 PQ: 0 ANSI: 6
Aug 11 18:13:06 ubuntu kernel: [  210.648565] sd 6:0:0:0: Attached scsi generic sg1 type 0
Aug 11 18:13:06 ubuntu kernel: [  210.648611] sd 6:0:0:0: [sdb] Spinning up disk...
Aug 11 18:13:12 ubuntu kernel: [  211.652014] ......ready
Aug 11 18:13:12 ubuntu kernel: [  216.672281] sd 6:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/466 GiB)
Aug 11 18:13:12 ubuntu kernel: [  216.672284] sd 6:0:0:0: [sdb] 4096-byte physical blocks
Aug 11 18:13:12 ubuntu kernel: [  216.672874] sd 6:0:0:0: [sdb] Write Protect is off
Aug 11 18:13:12 ubuntu kernel: [  216.672876] sd 6:0:0:0: [sdb] Mode Sense: 53 00 10 08
Aug 11 18:13:12 ubuntu kernel: [  216.673194] sd 6:0:0:0: [sdb] Disabling FUA
Aug 11 18:13:12 ubuntu kernel: [  216.673197] sd 6:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Aug 11 18:13:12 ubuntu kernel: [  216.700326] sd 6:0:0:0: [sdb] Attached SCSI disk
Aug 11 18:13:58 ubuntu kernel: [  262.676059] ata1.00: exception Emask 0x10 SAct 0x3 SErr 0x280100 action 0x6 frozen
Aug 11 18:13:58 ubuntu kernel: [  262.676065] ata1.00: irq_stat 0x08000000, interface fatal error
Aug 11 18:13:58 ubuntu kernel: [  262.676069] ata1: SError: { UnrecovData 10B8B BadCRC }
Aug 11 18:13:58 ubuntu kernel: [  262.676072] ata1.00: failed command: READ FPDMA QUEUED
Aug 11 18:13:58 ubuntu kernel: [  262.676077] ata1.00: cmd 60/00:00:00:e9:aa/01:00:0d:00:00/40 tag 0 ncq 131072 in
Aug 11 18:13:58 ubuntu kernel: [  262.676077]          res 50/00:00:00:ea:aa/00:01:0d:00:00/40 Emask 0x10 (ATA bus error)
Aug 11 18:13:58 ubuntu kernel: [  262.676080] ata1.00: status: { DRDY }
Aug 11 18:13:58 ubuntu kernel: [  262.676083] ata1.00: failed command: READ FPDMA QUEUED
Aug 11 18:13:58 ubuntu kernel: [  262.676088] ata1.00: cmd 60/00:08:00:ea:aa/01:00:0d:00:00/40 tag 1 ncq 131072 in
Aug 11 18:13:58 ubuntu kernel: [  262.676088]          res 50/00:00:00:ea:aa/00:01:0d:00:00/40 Emask 0x10 (ATA bus error)
Aug 11 18:13:58 ubuntu kernel: [  262.676090] ata1.00: status: { DRDY }
Aug 11 18:13:58 ubuntu kernel: [  262.676094] ata1: hard resetting link
Aug 11 18:13:58 ubuntu kernel: [  263.168042] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
Aug 11 18:13:58 ubuntu kernel: [  263.170384] ata1.00: configured for UDMA/133
Aug 11 18:13:58 ubuntu kernel: [  263.184051] ata1: EH complete
Aug 11 18:14:01 ubuntu kernel: [  265.832028] sd 6:0:0:0: [sdb] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT 
Aug 11 18:14:01 ubuntu kernel: [  265.832035] sd 6:0:0:0: [sdb] tag#1 CDB: Write(10) 2a 00 00 07 fc 00 00 04 00 00
Aug 11 18:14:01 ubuntu kernel: [  265.832156] scsi host6: uas_eh_bus_reset_handler start
Aug 11 18:14:01 ubuntu kernel: [  265.944900] usb 10-1: reset SuperSpeed USB device number 2 using xhci_hcd
Aug 11 18:14:01 ubuntu kernel: [  265.964772] scsi host6: uas_eh_bus_reset_handler success
Aug 11 18:14:36 ubuntu kernel: [  300.904033] sd 6:0:0:0: [sdb] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT 
Aug 11 18:14:36 ubuntu kernel: [  300.904040] sd 6:0:0:0: [sdb] tag#1 CDB: Write(10) 2a 00 00 0f fc 00 00 04 00 00
Aug 11 18:14:36 ubuntu kernel: [  300.904159] scsi host6: uas_eh_bus_reset_handler start
Aug 11 18:14:36 ubuntu kernel: [  301.016885] usb 10-1: reset SuperSpeed USB device number 2 using xhci_hcd
Aug 11 18:14:36 ubuntu kernel: [  301.040512] scsi host6: uas_eh_bus_reset_handler success
(略)
Aug 11 19:16:49 ubuntu kernel: [ 4033.896032] sd 6:0:0:0: [sdb] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT 
Aug 11 19:16:49 ubuntu kernel: [ 4033.896039] sd 6:0:0:0: [sdb] tag#1 CDB: Write(10) 2a 00 03 49 34 00 00 04 00 00
Aug 11 19:16:49 ubuntu kernel: [ 4033.896173] scsi host6: uas_eh_bus_reset_handler start
Aug 11 19:16:49 ubuntu kernel: [ 4034.009027] usb 10-1: reset SuperSpeed USB device number 2 using xhci_hcd
Aug 11 19:16:49 ubuntu kernel: [ 4034.028525] scsi host6: uas_eh_bus_reset_handler success

続き:
nmtysh.hatenablog.com

Time Machineバックアップの除外リストメモ

一部伏せ字に変更済み

$ plutil -p /Volumes/*****/Backups.backupdb/*****/Latest/.exclusions.plist
{
  "apiExclusionPaths" => [
    0 => "//Users/Shared/adi"
    1 => "/Users/Shared/adi"
  ]
  "systemFilesExcluded" => 0
  "userExclusionPaths" => [
    0 => "/private/tmp"
    1 => "/private/var/vm"
    2 => "/Users/*****/.vagrant.d/cache"
    3 => "/Users/*****/Library/Caches"
    4 => "/Users/*****/.vagrant.d/gems/cache"
    5 => "/Users/*****/Downloads"
    6 => "/Users/*****/VirtualBox VMs"
    7 => "/Users/*****/Dropbox/.dropbox.cache"
    8 => "/private/var/tmp"
    9 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 1/Application Cache"
    10 => "/Users/*****/Library/Application Support/Kindle/Cache"
    11 => "/Users/*****/.docker/machine/machines"
    12 => "/Users/*****/.docker/machine/cache"
    13 => "/Users/*****/Library/Application Support/Canon_Inc_IC/DPP4/DppMWare/Cache"
    14 => "/Users/*****/Library/Application Support/Amazon Music/Data/Artwork Cache"
    15 => "/Users/*****/Library/Application Support/Amazon Music/Data/Hammer Cache"
    16 => "/Users/*****/Library/Application Support/Amazon Music/Data/Streaming Cache"
    17 => "/Users/*****/Library/Application Support/Amazon Music/Data/App Cache"
  ]
  "stickyExclusionPaths" => [
    0 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 5/Favicons"
    1 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 4/History"
    2 => "/Users/*****/Music/iTunes/iTunes Music Library.xml"
    3 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Module Whitelist"
    4 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 4/Favicons"
    5 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing IP Blacklist"
    6 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 3/History"
    7 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 3/Favicons"
    8 => "/Users/*****/Library/LanguageModeling/ja-dynamic.lm"
    9 => "/Users/*****/Music/iTunes/Album Artwork/Store"
    10 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 1/History-journal"
    11 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Csd Whitelist"
    12 => "/Users/*****/Library/LanguageModeling/en-dynamic.lm"
    13 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing UwS List"
    14 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Extension Blacklist"
    15 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Bloom"
    16 => "/Users/*****/Library/Application Support/Google/Chrome/System Profile/History"
    17 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Download"
    18 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 1/Favicons"
    19 => "/Users/*****/Library/iTunes/iPod Software Updates"
    20 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 1/Favicons-journal"
    21 => "/Users/*****/Library/Application Support/Google/Chrome/System Profile/Favicons"
    22 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 1/History"
    23 => "/Users/*****/Music/iTunes/Album Artwork/Generated"
    24 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Resource Blacklist"
    25 => "/Users/*****/Music/iTunes/Album Artwork/Editorial"
    26 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 4/History-journal"
    27 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Bloom Prefix Set"
    28 => "/Users/Shared/adi"
    29 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Download Whitelist"
    30 => "/Users/*****/Library/Calendars/Calendar Cache"
    31 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing UwS List Prefix Set"
    32 => "/Users/*****/Library/Application Support/Google/Chrome/Profile 5/History"
    33 => "/Users/*****/Library/Application Support/Google/Chrome/Safe Browsing Inclusion Whitelist"
    34 => "/Users/*****/Music/iTunes/Album Artwork/Cache"
  ]
  "standardExclusionPaths" => [
    0 => "/.MobileBackups"
    1 => "/.MobileBackups.trash"
    2 => "/.Spotlight-V100"
    3 => "/.TemporaryItems"
    4 => "/.Trashes"
    5 => "/.com.apple.backupd.mvlist.plist"
    6 => "/.fseventsd"
    7 => "/.hotfiles.btree"
    8 => "/.vol"
    9 => "/Backups.backupdb"
    10 => "/Desktop DB"
    11 => "/Desktop DF"
    12 => "/Library/Caches"
    13 => "/Library/Logs"
    14 => "/Library/Updates"
    15 => "/MobileBackups.trash"
    16 => "/Network"
    17 => "/System/Library/Caches"
    18 => "/System/Library/Extensions/Caches"
    19 => "/Users/Guest"
    20 => "/Users/Shared/SC Info"
    21 => "/Volumes"
    22 => "/automount"
    23 => "/cores"
    24 => "/dev"
    25 => "/home"
    26 => "/net"
    27 => "/private/Network"
    28 => "/private/etc/kcpassword"
    29 => "/private/tftpboot"
    30 => "/private/tmp"
    31 => "/private/var/automount"
    32 => "/private/var/db/Spotlight"
    33 => "/private/var/db/Spotlight-V100"
    34 => "/private/var/db/com.apple.backupd.backupVerification"
    35 => "/private/var/db/dhcpclient"
    36 => "/private/var/db/dyld"
    37 => "/private/var/db/dyld/shared_region_roots"
    38 => "/private/var/db/efw_cache"
    39 => "/private/var/db/fseventsd"
    40 => "/private/var/db/systemstats"
    41 => "/private/var/folders"
    42 => "/private/var/lib/postfix/greylist.db"
    43 => "/private/var/log"
    44 => "/private/var/run"
    45 => "/private/var/spool/cups"
    46 => "/private/var/spool/fax"
    47 => "/private/var/spool/uucp"
    48 => "/private/var/tmp"
    49 => "/private/var/vm"
  ]
  "sourcePaths" => [
    0 => "/"
  ]
}

こうしてみるとデフォルトあるいは自動的(?)に追加される項目とかぶっているものがありますね。
ChromeのApplication Cacheは自動的に除外されないのか……

standardExclusionPaths とかぶっていたもの

  • /private/tmp
  • /private/var/vm
  • /private/var/tmp

stickyExclusionPaths とかぶっていたもの

なし

Cajaで選択したファイル等を新規作成フォルダにまとめるスクリプトを作りました

※この記事はQiitaにも投稿しています。

Ubuntu MATEのCaja(Nautilus)上でファイルやフォルダを整理する場合、

  1. 新しいフォルダを作成
  2. まとめたいファイルなどを選択
  3. 作成したフォルダに移動

といくつかの操作を行う必要があります。
それなりに量がある場合にこれらの操作を毎回行うのは手間なので選択したファイルなどを新規作成フォルダに移動するシェルスクリプトを作成しました。

0. 環境

1. スクリプトファイルを作成する

~/.config/caja/scripts に任意のファイル名でファイルを作成します。

#!/bin/bash

# 選択したファイルやフォルダを新しく作成したフォルダに移動する

# フォルダの作成。失敗したら終了
folder=$(date "+%Y%m%d_%H%M%S_%N")
mkdir ./${folder} || exit 1

# 作成したフォルダへ移動する
for arg
do
    mv "${arg}" ${folder}/
done
exit 0

2. 実行権限を付与する

作成したスクリプトファイルに実行権限を付与します。

$ chmod u+x ~/.config/caja/scripts/move.sh

3. Cajaから実行する

まとめたいファイルやフォルダを選んで、コンテキストメニューの「スクリプト」→「(1で作ったスクリプト)」を選択してスクリプトを実行します。
時刻を元にしたフォルダが作成され、その中に選択していたファイルなどが移動されます。

スクリプトで移動していますので「元に戻す」操作ができないという欠点があります。
間違えた場合は手動で戻してください。

日本語って難しい……

X. 関連