Skip to content

Instantly share code, notes, and snippets.

@k4zuki02h4t4
Last active June 5, 2019 23:42
Show Gist options
  • Save k4zuki02h4t4/d8d2cd6c73e7bd20aa8f23dcee823877 to your computer and use it in GitHub Desktop.
Save k4zuki02h4t4/d8d2cd6c73e7bd20aa8f23dcee823877 to your computer and use it in GitHub Desktop.
よく使う便利コメンド

gzip で圧縮する

$ tar -C /path/to/dir -zcvf archive.tar.gz ./

gzip を解凍する

$ tar -C /path/to/dir -zxvf archive.tar.gz

public_html以下のファイルを一括で644へ変更する

$ find /path/to/dir -type f -print | xargs chmod 644
$ find /path/to/dir -type f -exec chmod 644 {} +

public_html以下の特定の拡張子のファイルを644へ変更する

$ find /path/to/dir -type f \( -name \*.php \) -print | xargs chmod 644
$ find /path/to/dir -type f \( -name \*.php \) -exec chmod 644 {} +

public_html以下のディレクトリを一括で705へ変更する

$ find /path/to/dir -type d -print | xargs chmod 705
$ find /path/to/dir -type d -exec chmod 705 {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment