12
9

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.

Mac OS X で Tar コマンドを使うときに役に立つオプション

Last updated at Posted at 2015-12-29

圧縮

基本

Mac のシステムファイルを除いて圧縮する

tar cfvz [ファイル名].tgz --exclude='*/.*'  [圧縮フォルダ]

メッセージ要らない時

Mac のシステムファイルを除いて圧縮する

tar cfz [ファイル名].tgz --exclude='*/.*' [圧縮フォルダ]

解凍

基本

tar xvf [ファイル名].tgz

メッセージが要らない時

tar xf [ファイル名].tgz

参考:覚えておきたい TAR などの解凍・圧縮コマンドの使い方まとめ

システムファイルを削除

間違ってシステムファイルを入れちゃった場合

cd [ディレクトリの親に移動]
find ./ \( -name ".DS_Store" -or -name "._*" \) -print -exec rm {} ";"

参考:Macで不要なファイル(.DS_Storeや._~)を削除する - 林檎な日々
http://d.hatena.ne.jp/kacchi0516/20121025/1351168388

12
9
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
12
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?